diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e392a7..fbb99a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ OS: - New board support: LilyGo T-Display-S3 - New board support: M5Stack Fire - New board support: ODroid Go +- Add FreeRTOS module for low-level ESP32 functions 0.8.0 ===== diff --git a/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py b/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py index 7f1c7323..f41db506 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py @@ -2,10 +2,12 @@ from mpos import Activity class FirstRun(Activity): + dontshow_checkbox = None + def onCreate(self): screen = lv.obj() + screen.set_flex_flow(lv.FLEX_FLOW.COLUMN) label = lv.label(screen) - label.align(lv.ALIGN.TOP_LEFT, 0, 0) label.set_width(lv.pct(100)) touchhelp = "swipe from the left edge to go back and from the top edge to open the menu." label.set_text(f''' @@ -20,4 +22,18 @@ If you've got 3 buttons, one is PREVIOUS, one is ENTER and one is NEXT. To go ba If you've got 2 buttons, one is PREVIOUS, the other is NEXT. To ENTER, press both at the same time. To go back, long-press PREVIOUS. ''') label.set_long_mode(lv.label.LONG_MODE.WRAP) + + self.dontshow_checkbox = lv.checkbox(screen) + self.dontshow_checkbox.set_text("Don't show again") + + closebutton = lv.button(screen) + closebutton.add_event_cb(lambda *args: self.finish(), lv.EVENT.CLICKED, None) + closelabel = lv.label(closebutton) + closelabel.set_text("Close") + self.setContentView(screen) + + def onPause(self, screen): + checked = self.dontshow_checkbox.get_state() & lv.STATE.CHECKED + if checked: + print("TODO: make sure this doesn't appear again") diff --git a/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py b/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py index ee63c437..440ee6b4 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py @@ -86,7 +86,7 @@ class Launcher(Activity): iconcont_height = icon_size + label_height for app in AppManager.get_app_list(): - if app.category == "launcher" or app.fullname == "com.micropythonos.firstrun": + if app.category == "launcher": continue app_name = app.name diff --git a/internal_filesystem/builtin/apps/com.micropythonos.launcher/res/mipmap-mdpi/icon_64x64.png b/internal_filesystem/builtin/apps/com.micropythonos.launcher/res/mipmap-mdpi/icon_64x64.png deleted file mode 100644 index 0cecee4c..00000000 Binary files a/internal_filesystem/builtin/apps/com.micropythonos.launcher/res/mipmap-mdpi/icon_64x64.png and /dev/null differ diff --git a/internal_filesystem/lib/mpos/main.py b/internal_filesystem/lib/mpos/main.py index 2fc5e69c..700e1df6 100644 --- a/internal_filesystem/lib/mpos/main.py +++ b/internal_filesystem/lib/mpos/main.py @@ -161,7 +161,7 @@ except Exception as e: # This will throw an exception if there is already a "/builtin" folder present print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e) -prefs = SharedPreferences("com.micropythonos.settings") +prefs = SharedPreferences("com.micropythonos.settings", defaults={"auto_start_app": "com.micropythonos.firstrun"}) # if not value is set, it will start the FirstRun app AppearanceManager.init(prefs) init_rootscreen() # shows the boot logo @@ -190,13 +190,10 @@ def custom_exception_handler(e): #focusgroup.delete() #lv.deinit() -import sys import task_handler -if sys.platform == "esp32": - mpos.ui.task_handler = task_handler.TaskHandler(duration=5, exception_hook=custom_exception_handler) # 1ms gives highest framerate on esp32-s3's but might have side effects? -else: - mpos.ui.task_handler = task_handler.TaskHandler(duration=5, exception_hook=custom_exception_handler) # 5ms is recommended for MicroPython+LVGL on desktop (less results in lower framerate) - +# 5ms is recommended for MicroPython+LVGL on desktop (less results in lower framerate but still okay) +# 1ms gives highest framerate on esp32-s3's but might have side effects? +mpos.ui.task_handler = task_handler.TaskHandler(duration=1, exception_hook=custom_exception_handler) # Convenient for apps to be able to access these: mpos.ui.task_handler.TASK_HANDLER_STARTED = task_handler.TASK_HANDLER_STARTED mpos.ui.task_handler.TASK_HANDLER_FINISHED = task_handler.TASK_HANDLER_FINISHED diff --git a/scripts/bundle_apps.sh b/scripts/bundle_apps.sh index 3ac39b76..e403eb29 100755 --- a/scripts/bundle_apps.sh +++ b/scripts/bundle_apps.sh @@ -18,10 +18,10 @@ rm "$outputjson" # com.quasikili.quasidoodle doesn't work on touch screen devices # com.micropythonos.filemanager doesn't do anything other than let you browse the filesystem, so it's confusing # com.micropythonos.errortest is an intentional bad app for testing (caught by tests/test_graphical_launch_all_apps.py) -# com.micropythonos.doom_launcher isn't ready because the firmware doesn't have doom built-in yet # com.micropythonos.nostr isn't ready for release yet -# cz.ucw.pavel.calendar isn't ready for release yet -blacklist="com.micropythonos.filemanager com.quasikili.quasidoodle com.micropythonos.errortest com.micropythonos.doom_launcher com.micropythonos.nostr cz.ucw.pavel.calendar" +blacklist="com.micropythonos.filemanager com.quasikili.quasidoodle com.micropythonos.errortest com.micropythonos.nostr" +blacklist="$blacklist com.micropythonos.doom_launcher com.micropythonos.doom" # not ready yet +blacklist="$blacklist cz.ucw.pavel.calendar cz.ucw.pavel.cellular cz.ucw.pavel.compass cz.ucw.pavel.navstar" # not ready yet echo "[" | tee -a "$outputjson" diff --git a/scripts/install.sh b/scripts/install.sh index 4e2bb6ff..9efce0b6 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -68,9 +68,13 @@ $mpremote fs mkdir :/data/com.micropythonos.system.wifiservice $mpremote fs cp ../internal_filesystem_excluded/data/com.micropythonos.system.wifiservice/config.json :/data/com.micropythonos.system.wifiservice/ $mpremote fs mkdir :/apps -$mpremote fs cp -r apps/com.micropythonos.musicplayer :/apps/ -$mpremote fs cp -r apps/com.micropythonos.soundrecorder :/apps/ -exit 1 + +# Use this to install just a few apps: +#$mpremote fs cp -r apps/com.micropythonos.musicplayer :/apps/ +#$mpremote fs cp -r apps/com.micropythonos.soundrecorder :/apps/ +#$mpremote fs cp -r apps/com.micropythonos.breakout :/apps/ +#exit 1 + $mpremote fs cp -r apps/com.micropythonos.* :/apps/ find apps/ -maxdepth 1 -type l | while read symlink; do if echo $symlink | grep quasiboats; then