mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-12 23:48:10 -07:00
Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev
This commit is contained in:
Regular → Executable
@@ -394,7 +394,7 @@ def generate_embed_app_metadata_actions(source, target, env, for_signature):
|
||||
"$APPMETAEMBED_COMSTR",
|
||||
),
|
||||
Action(
|
||||
"${FBT_SCRIPT_DIR}/fastfap.py ${TARGET} ${OBJCOPY}",
|
||||
"${PYTHON3} ${FBT_SCRIPT_DIR}/fastfap.py ${TARGET} ${OBJCOPY}",
|
||||
"$FASTFAP_COMSTR",
|
||||
),
|
||||
)
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
@@ -8,6 +8,7 @@ import time
|
||||
def flp_serial_by_name(flp_name):
|
||||
if sys.platform == "darwin": # MacOS
|
||||
flp_serial = "/dev/cu.usbmodemflip_" + flp_name + "1"
|
||||
logging.info(f"Darwin, looking for {flp_serial}")
|
||||
elif sys.platform == "linux": # Linux
|
||||
flp_serial = (
|
||||
"/dev/serial/by-id/usb-Flipper_Devices_Inc._Flipper_"
|
||||
@@ -16,10 +17,12 @@ def flp_serial_by_name(flp_name):
|
||||
+ flp_name
|
||||
+ "-if00"
|
||||
)
|
||||
logging.info(f"linux, looking for {flp_serial}")
|
||||
|
||||
if os.path.exists(flp_serial):
|
||||
return flp_serial
|
||||
else:
|
||||
logging.info(f"Couldn't find {logging.info} on this attempt.")
|
||||
if os.path.exists(flp_name):
|
||||
return flp_name
|
||||
else:
|
||||
@@ -38,7 +41,7 @@ def main():
|
||||
level=logging.INFO,
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
logging.info("Waiting for Flipper to be ready...")
|
||||
logging.info(f"Waiting for Flipper {flipper_name} to be ready...")
|
||||
|
||||
while flipper == "" and elapsed < UPDATE_TIMEOUT:
|
||||
elapsed += 1
|
||||
|
||||
@@ -20,13 +20,13 @@ def main():
|
||||
logging.error("Flipper not found!")
|
||||
sys.exit(1)
|
||||
|
||||
with serial.Serial(flp_serial, timeout=1) as flipper:
|
||||
with serial.Serial(flp_serial, timeout=10) as flipper:
|
||||
logging.info(f"Found Flipper at {flp_serial}")
|
||||
flipper.baudrate = 230400
|
||||
flipper.flushOutput()
|
||||
flipper.flushInput()
|
||||
|
||||
flipper.timeout = 180
|
||||
flipper.timeout = 300
|
||||
|
||||
flipper.read_until(b">: ").decode("utf-8")
|
||||
flipper.write(b"unit_tests\r")
|
||||
|
||||
Regular → Executable
Reference in New Issue
Block a user