Skip to content

Commit c5d14f3

Browse files
TaskHandler: use recommended duration for desktop
1 parent 99c3954 commit c5d14f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal_filesystem/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ def custom_exception_handler(e):
5252
focusgroup.remove_all_objs()
5353
focusgroup.delete()
5454

55-
mpos.ui.th = task_handler.TaskHandler(duration=1) # 5ms is recommended for MicroPython+LVGL on desktop but lower gives higher framerate
55+
import sys
56+
if sys.platform == "esp32":
57+
mpos.ui.th = task_handler.TaskHandler(duration=1) # 1ms gives highest framerate on esp32-s3's
58+
else:
59+
mpos.ui.th = task_handler.TaskHandler(duration=5) # 5ms is recommended for MicroPython+LVGL on desktop (less results in lower framerate)
5660

5761
try:
5862
import freezefs_mount_builtin

0 commit comments

Comments
 (0)