2025-04-29 13:10:38 +02:00
|
|
|
import task_handler
|
2025-05-14 13:35:07 +02:00
|
|
|
|
2025-04-21 11:37:30 +02:00
|
|
|
|
2025-05-12 00:05:56 +02:00
|
|
|
import mpos.ui
|
|
|
|
|
mpos.ui.create_rootscreen()
|
|
|
|
|
mpos.ui.create_notification_bar()
|
|
|
|
|
mpos.ui.create_drawer(display)
|
2025-05-14 13:35:07 +02:00
|
|
|
mpos.ui.th = task_handler.TaskHandler(duration=5) # 5ms is recommended for MicroPython+LVGL on desktop
|
2025-04-21 11:37:30 +02:00
|
|
|
|
2025-04-29 17:09:37 +02:00
|
|
|
try:
|
2025-04-30 13:49:42 +02:00
|
|
|
import freezefs_mount_builtin
|
2025-04-29 17:09:37 +02:00
|
|
|
except Exception as e:
|
2025-05-10 17:27:16 +02:00
|
|
|
print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e)
|
2025-04-29 17:09:37 +02:00
|
|
|
|
2025-05-11 23:55:18 +02:00
|
|
|
from mpos import apps
|
2025-05-13 14:11:50 +02:00
|
|
|
apps.execute_script("builtin/system/button.py", True, False, False) # Install button handler through IRQ
|
2025-05-11 23:55:18 +02:00
|
|
|
apps.auto_connect()
|
|
|
|
|
apps.restart_launcher()
|
2025-05-01 15:44:12 +02:00
|
|
|
|
2025-05-11 23:55:18 +02:00
|
|
|
# If we got this far without crashing, then no need to rollback the update:
|
2025-05-10 17:27:16 +02:00
|
|
|
try:
|
|
|
|
|
import ota.rollback
|
|
|
|
|
ota.rollback.cancel()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print("main.py: warning: could not mark this update as valid:", e)
|