You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a timeline with two animations that perform a fade-in and fade-out of an image.
However, I found that the first animation (the fade-in) is skipped.
So, I added a line to exec_cb to print the value of the animations.
Then I noticed that the exec_cb and custom_exec_cb of every animation in a timeline are executed even if the animation has not started or has already ended.
(the fade-out animation overrides the fade-in animation in this case)
I tried to comment out these lines in anim_timeline_set_act_time
Sorry for the late reply. The problem is that you need to add lv_anim_set_early_apply(&intro_fade_out_anim, false);
By default the animations have early_apply=true to apply the start value when they start even if there is a delay. In your case both animations had early_apply=true so the first set opa=0, then it was overwritten by opa=255.
We definitely need to document it in a clean way. cc @vwheeler63
LVGL version
v9.2.2
Platform
Board: ESP32-C3 Super Mini (esp32-c3-devkitm-1)
Framework: esp-idf v5.3.1
IDE: Clion 2024.3 + PlatformIO
Build Machine: macOS 15.1.1 arm64
What happened?
I created a timeline with two animations that perform a fade-in and fade-out of an image.
However, I found that the first animation (the fade-in) is skipped.
So, I added a line to exec_cb to print the value of the animations.
Then I noticed that the exec_cb and custom_exec_cb of every animation in a timeline are executed even if the animation has not started or has already ended.
(the fade-out animation overrides the fade-in animation in this case)
I tried to comment out these lines in
anim_timeline_set_act_time
Then this modification got my animations to work.
But I am not sure if it broke anything. Could you take a look at it?
How to reproduce?
Full Code: https://github.com/amk3y/lvgl_gif_lab/blob/main/src/main.c
The text was updated successfully, but these errors were encountered: