fix(anim_timeline): fix special cases of anim timeline and add tests

This commit is contained in:
Gabor Kiss-Vamosi
2023-11-18 19:01:31 +01:00
parent 873364f65f
commit c526653822
10 changed files with 278 additions and 37 deletions

View File

@@ -64,7 +64,7 @@ void lv_example_anim_3(void)
static int32_t anim_path_bezier3_cb(const lv_anim_t * a)
{
uint32_t t = lv_map(a->act_time, 0, a->time, 0, 1024);
uint32_t t = lv_map(a->act_time, 0, a->duration, 0, 1024);
int32_t step = lv_bezier3(t, 0, ginfo.p1, ginfo.p2, 1024);
int32_t new_value;
new_value = step * (a->end_value - a->start_value);