summaryrefslogtreecommitdiff
path: root/src/libs/lvgl/src/lv_misc/lv_anim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/lvgl/src/lv_misc/lv_anim.c')
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_anim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.c b/src/libs/lvgl/src/lv_misc/lv_anim.c
index 790dfc77..77bd87b9 100644
--- a/src/libs/lvgl/src/lv_misc/lv_anim.c
+++ b/src/libs/lvgl/src/lv_misc/lv_anim.c
@@ -158,12 +158,12 @@ uint16_t lv_anim_count_running(void)
* @param end end value of the animation
* @return the required time [ms] for the animation with the given parameters
*/
-uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end)
+uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end)
{
int32_t d = LV_MATH_ABS((int32_t)start - end);
uint32_t time = (int32_t)((int32_t)(d * 1000) / speed);
- if(time > UINT16_MAX) time = UINT16_MAX;
+ if(time > UINT32_MAX) time = UINT32_MAX;
if(time == 0) {
time++;