Skip to content

Commit 99c3954

Browse files
main.py: increase framerate
1 parent 44a7df2 commit 99c3954

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

internal_filesystem/main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@
4444
if focusgroup: # on esp32 this may not be set
4545
focusgroup.remove_all_objs() # might be better to save and restore the group for "back" actions
4646

47-
mpos.ui.th = task_handler.TaskHandler(duration=5) # 5ms is recommended for MicroPython+LVGL on desktop
47+
# Can be passed to TaskHandler, currently unused:
48+
def custom_exception_handler(e):
49+
print(f"custom_exception_handler called: {e}")
50+
mpos.ui.th.deinit()
51+
# otherwise it does focus_next and then crashes while doing lv.deinit()
52+
focusgroup.remove_all_objs()
53+
focusgroup.delete()
54+
55+
mpos.ui.th = task_handler.TaskHandler(duration=1) # 5ms is recommended for MicroPython+LVGL on desktop but lower gives higher framerate
4856

4957
try:
5058
import freezefs_mount_builtin

0 commit comments

Comments
 (0)