You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
task_handler each 1ms for higher framerate, start firstrun at startup, remove launcher icon (not needed)
This commit is contained in:
@@ -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
|
||||
=====
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
+7
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user