Skip to content

Commit 147e9a2

Browse files
committed
module/startup: Execute the application and exit the startup ui.
Signed-off-by: lbuque <[email protected]>
1 parent b406de4 commit 147e9a2

File tree

27 files changed

+36
-34
lines changed

27 files changed

+36
-34
lines changed

m5stack/modules/startup/airq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ async def _keycode_enter_event_handler(self, fw):
443443
# print("_keycode_enter_event_handler")
444444
M5.Lcd.clear()
445445
execfile("/".join(["apps/", self._files[self._file_pos]]), {"__name__": "__main__"}) # noqa: F821
446-
sys.exit(0)
446+
raise KeyboardInterrupt
447447

448448
async def _keycode_back_event_handler(self, fw):
449449
# print("_keycode_back_event_handler")

m5stack/modules/startup/basic/apps/app_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ async def _btnb_event_handler(self, fw):
243243

244244
async def _btnc_event_handler(self, fw):
245245
execfile("/".join(["apps/", self._files[self._file_pos]]), {"__name__": "__main__"}) # noqa: F821
246-
sys.exit(0)
246+
raise KeyboardInterrupt
247247

248248
async def _btnc_hold_event_handler(self, fw):
249249
boot_option.set_boot_option(2)

m5stack/modules/startup/basic/apps/app_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def on_exit(self):
7575
async def _btnb_event_handler(self, fw):
7676
# print("_btnb_event_handler")
7777
execfile("main.py", {"__name__": "__main__"}) # noqa: F821
78-
sys.exit(0)
78+
raise KeyboardInterrupt
7979

8080
async def _btnc_event_handler(self, fw):
8181
# print("_btnc_event_handler")

m5stack/modules/startup/cardputer/apps/app_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def _btn_down_event_handler(self, fw):
256256

257257
def _btn_once_event_handler(self, event):
258258
execfile("/".join(["apps/", self._files[self._file_pos]]), {"__name__": "__main__"}) # noqa: F821
259-
sys.exit(0)
259+
raise KeyboardInterrupt
260260

261261
def _btn_always_event_handler(self, event):
262262
nvs = esp32.NVS("uiflow")

m5stack/modules/startup/cardputer/apps/app_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def on_exit(self):
103103

104104
def _handle_run_once(self, fw):
105105
execfile("main.py", {"__name__": "__main__"}) # noqa: F821
106-
sys.exit(0)
106+
raise KeyboardInterrupt
107107

108108
def _handle_run_always(self, fw):
109109
nvs = esp32.NVS("uiflow")

m5stack/modules/startup/core2/apps/app_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _btn_down_event_handler(self, fw):
280280

281281
def _btn_once_event_handler(self, event):
282282
execfile("/".join(["apps/", self._files[self._file_pos]]), {"__name__": "__main__"}) # noqa: F821
283-
sys.exit(0)
283+
raise KeyboardInterrupt
284284

285285
def _btn_always_event_handler(self, event):
286286
nvs = esp32.NVS("uiflow")

m5stack/modules/startup/core2/apps/app_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def _click_event_handler(self, x, y, fw):
106106

107107
def _handle_run_once(self, fw):
108108
execfile("main.py", {"__name__": "__main__"}) # noqa: F821
109-
sys.exit(0)
109+
raise KeyboardInterrupt
110110

111111
def _handle_run_always(self, fw):
112112
nvs = esp32.NVS("uiflow")

m5stack/modules/startup/coreink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ async def _keycode_enter_event_handler(self, fw):
443443
# print("_keycode_enter_event_handler")
444444
M5.Lcd.clear()
445445
execfile("/".join(["apps/", self._files[self._file_pos]]), {"__name__": "__main__"}) # noqa: F821
446-
sys.exit(0)
446+
raise KeyboardInterrupt
447447

448448
async def _keycode_back_event_handler(self, fw):
449449
# print("_keycode_back_event_handler")

m5stack/modules/startup/cores3/apps/app_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _btn_down_event_handler(self, fw):
241241

242242
def _btn_once_event_handler(self, event):
243243
execfile("/".join(["apps", self._files[self._file_pos]]), {"__name__": "__main__"}) # noqa: F821
244-
sys.exit(0)
244+
raise KeyboardInterrupt
245245

246246
def _btn_always_event_handler(self, event):
247247
nvs = esp32.NVS("uiflow")

m5stack/modules/startup/cores3/apps/app_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def _click_event_handler(self, x, y, fw):
105105

106106
def _handle_run_once(self, fw):
107107
execfile("main.py", {"__name__": "__main__"}) # noqa: F821
108-
sys.exit(0)
108+
raise KeyboardInterrupt
109109

110110
def _handle_run_always(self, fw):
111111
nvs = esp32.NVS("uiflow")

0 commit comments

Comments
 (0)