aod: run LVGL task handler until all work finished

This commit is contained in:
mark9064 2024-04-01 00:21:13 +01:00 committed by JF
parent 2bb611db8e
commit 3e8accde69

View File

@ -242,7 +242,9 @@ void DisplayApp::Refresh() {
// If not true, then wait that amount of time // If not true, then wait that amount of time
queueTimeout = CalculateSleepTime(); queueTimeout = CalculateSleepTime();
if (queueTimeout == 0) { if (queueTimeout == 0) {
lv_task_handler(); // Keep running the task handler if it still has things to draw
while (!lv_task_handler()) {
};
// Drop frames that we've missed if the loop took way longer than expected to execute // Drop frames that we've missed if the loop took way longer than expected to execute
while (queueTimeout == 0) { while (queueTimeout == 0) {
alwaysOnTickCount += 1; alwaysOnTickCount += 1;