-
-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework Refresh #497
Rework Refresh #497
Conversation
I think it would be better and a smaller patch to simply stop calling some DisplayApp's |
Good idea. I've now created |
@Riksu9000 Thanks for the fast conflict fixing! |
Now that LVGL has more accurate timing, we can use LVGL tasks to refresh apps instead of having DisplayApp do it. Using LVGL tasks to take care of refreshing lets each app choose the refresh rate, or not have it at all. Also it's better when less things are dependent on a task loop.
LVGL for some reason runs all tasks with higher priority again after a task with a lower priority has finished. The screen draw task is
LV_TASK_PRIO_MID
, so if the refresh task priority is lower than mid, it will redraw the screen. If the screen draw takes longer than the refresh period, the refresh task will be run again, which will run the screen draw again, resulting in an infinite loop andlv_task_handler()
never returns. Because of this, the refresh task must be at least LV_TASK_PRIO_MID.