mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-17 00:28:11 -07:00
Last for today | FAP updates
This commit is contained in:
@@ -11,6 +11,8 @@ Building:
|
||||
Build all FAP apps
|
||||
fap_{APPID}, launch_app APPSRC={APPID}:
|
||||
Build FAP app with appid={APPID}; upload & start it over USB
|
||||
faps_copy:
|
||||
Build and upload all FAP apps over USB
|
||||
|
||||
Flashing & debugging:
|
||||
flash, flash_blackmagic, jflash:
|
||||
|
||||
+18
-6
@@ -15,6 +15,13 @@ import serial.tools.list_ports as list_ports
|
||||
class Main(App):
|
||||
def init(self):
|
||||
self.parser.add_argument("-p", "--port", help="CDC Port", default="auto")
|
||||
self.parser.add_argument(
|
||||
"-l",
|
||||
"--launch",
|
||||
dest="launch_app",
|
||||
action="store_true",
|
||||
help="Launch app",
|
||||
)
|
||||
|
||||
self.parser.add_argument("fap_src_path", help="App file to upload")
|
||||
self.parser.add_argument(
|
||||
@@ -84,11 +91,16 @@ class Main(App):
|
||||
self.logger.error(f"Error: upload failed: {storage.last_error}")
|
||||
return -3
|
||||
|
||||
storage.send_and_wait_eol(f'loader open "Applications" {fap_dst_path}\r')
|
||||
result = storage.read.until(storage.CLI_EOL)
|
||||
if len(result):
|
||||
self.logger.error(f"Unexpected response: {result.decode('ascii')}")
|
||||
return -4
|
||||
if self.args.launch_app:
|
||||
storage.send_and_wait_eol(
|
||||
f'loader open "Applications" {fap_dst_path}\r'
|
||||
)
|
||||
result = storage.read.until(storage.CLI_EOL)
|
||||
if len(result):
|
||||
self.logger.error(
|
||||
f"Unexpected response: {result.decode('ascii')}"
|
||||
)
|
||||
return -4
|
||||
|
||||
return 0
|
||||
finally:
|
||||
@@ -96,4 +108,4 @@ class Main(App):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Main()()
|
||||
Main()()
|
||||
Reference in New Issue
Block a user