STM32
LVGL version 8.2.0
Hello.
Tell me how can I track the end of the animation?
Examples don’t help.
I have a simple bar, set the value to 50, the animation begins.
I need to wait for the animation to finish and only then change the value.
event_cb on the LV_EVENT_DRAW_PART_END event is triggered instantly as a bar is drawn without animation.
...
lv_obj_t *bar = lv_bar_create(frame);
lv_obj_remove_style_all(bar);
lv_obj_set_size(bar, 60, 10);
lv_obj_add_style(bar, &styleIndicatorBar, LV_PART_INDICATOR);
lv_obj_set_style_anim_time(bar, 100, 0);
lv_bar_set_value(bar, 50, LV_ANIM_ON);
lv_obj_add_event_cb(bar, event_cb, LV_EVENT_DRAW_PART_END, NULL);
...