You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Rollback OTA update if launcher fails to start
This commit is contained in:
+9
-1
@@ -1,6 +1,14 @@
|
||||
0.3.2
|
||||
=====
|
||||
- Settings app: add "Auto Start App" setting
|
||||
- Fri3d-2024 Badge: use same SPI freq as Waveshare 2 inch for uniformity
|
||||
- ESP32: reduce drawing frequency increasing task_handler duration from 1ms to 5ms
|
||||
- Tweak gesture navigation to trigger back and top menu more easily
|
||||
- Rollback OTA update if launcher fails to start
|
||||
|
||||
0.3.1
|
||||
=====
|
||||
- OSUpdate app: fix typo that caused update rollback
|
||||
- OSUpdate app: fix typo that prevented update rollback from being cancelled
|
||||
- Fix 'Home' button in top menu not stopping all apps
|
||||
- Update micropython-nostr library to fix epoch time on ESP32 and NWC event kind
|
||||
|
||||
|
||||
@@ -74,15 +74,17 @@ except Exception as e:
|
||||
|
||||
# Start launcher so it's always at bottom of stack
|
||||
launcher_app = PackageManager.get_launcher()
|
||||
mpos.apps.start_app(launcher_app.fullname)
|
||||
started_launcher = mpos.apps.start_app(launcher_app.fullname)
|
||||
# Then start another app if configured
|
||||
auto_start_app = prefs.get_string("auto_start_app", None)
|
||||
if auto_start_app and launcher_app.fullname != auto_start_app:
|
||||
mpos.apps.start_app(auto_start_app)
|
||||
|
||||
# If we got this far without crashing, then no need to rollback the update:
|
||||
try:
|
||||
import ota.rollback
|
||||
ota.rollback.cancel()
|
||||
except Exception as e:
|
||||
print("main.py: warning: could not mark this update as valid:", e)
|
||||
if not started_launcher:
|
||||
print("WARNING: launcher {launcher_app} failed to start, not cancelling OTA update rollback")
|
||||
else:
|
||||
try:
|
||||
import ota.rollback
|
||||
ota.rollback.cancel()
|
||||
except Exception as e:
|
||||
print("main.py: warning: could not mark this update as valid:", e)
|
||||
|
||||
Reference in New Issue
Block a user