From 99c395482fdd0c93d5e953c395de82a6a6c56ad5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 7 Nov 2025 11:58:53 +0100 Subject: [PATCH] main.py: increase framerate --- internal_filesystem/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal_filesystem/main.py b/internal_filesystem/main.py index bb46f1ce..90139207 100644 --- a/internal_filesystem/main.py +++ b/internal_filesystem/main.py @@ -44,7 +44,15 @@ focusgroup = lv.group_get_default() if focusgroup: # on esp32 this may not be set focusgroup.remove_all_objs() # might be better to save and restore the group for "back" actions -mpos.ui.th = task_handler.TaskHandler(duration=5) # 5ms is recommended for MicroPython+LVGL on desktop +# Can be passed to TaskHandler, currently unused: +def custom_exception_handler(e): + print(f"custom_exception_handler called: {e}") + mpos.ui.th.deinit() + # otherwise it does focus_next and then crashes while doing lv.deinit() + focusgroup.remove_all_objs() + focusgroup.delete() + +mpos.ui.th = task_handler.TaskHandler(duration=1) # 5ms is recommended for MicroPython+LVGL on desktop but lower gives higher framerate try: import freezefs_mount_builtin