Hello LVGL Team,
In my project, I use LVGL v7.11 with ZephyrRTOS.
I only update the screen when needed, I don’t use animation nor lv_tasks.
So roughly here is how things are connected:
void some_app_function()
{
refresh_statusbar(BATTERY, 50);
}
void refresh_statusbar(refresh_type, data)
{
switch(refresh_type)
{
case BATTERY:
/* some lvgl obj calls */
break;
case CHARGER:
/* some lvgl obj calls */
break;
case TIME:
/* some lvgl obj calls */
break;
}
lv_task_handler();
}
refresh_statusbar()
is called from different other contexts, sometimes this function could be called in less than 5ms to 10ms and in this case lv_task_handler()
just return LV_NO_TASK_READY
and screen is not updated.
Replacing lv_task_handler()
with lv_refr_now(NULL)
make things work flawlessly.
My question is would it be okay to use lv_refr_now(NULL)
instead of lv_task_handler()
in my use case ?
or better to change LV_DISP_DEF_REFR_PERIOD
to be like 1ms ?