|
| 1 | +Index: src/libs/lvgl/src/lv_misc/lv_anim.c |
| 2 | +IDEA additional info: |
| 3 | +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| 4 | +<+>UTF-8 |
| 5 | +=================================================================== |
| 6 | +diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.c b/src/libs/lvgl/src/lv_misc/lv_anim.c |
| 7 | +--- a/src/libs/lvgl/src/lv_misc/lv_anim.c (revision 12a3b6cc8ec1fd6b951c353ab3a5fbbb9934fdd4) |
| 8 | ++++ b/src/libs/lvgl/src/lv_misc/lv_anim.c (date 1610901672072) |
| 9 | +@@ -158,12 +158,12 @@ |
| 10 | + * @param end end value of the animation |
| 11 | + * @return the required time [ms] for the animation with the given parameters |
| 12 | + */ |
| 13 | +-uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end) |
| 14 | ++uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end) |
| 15 | + { |
| 16 | + int32_t d = LV_MATH_ABS((int32_t)start - end); |
| 17 | + uint32_t time = (int32_t)((int32_t)(d * 1000) / speed); |
| 18 | + |
| 19 | +- if(time > UINT16_MAX) time = UINT16_MAX; |
| 20 | ++ if(time > UINT32_MAX) time = UINT32_MAX; |
| 21 | + |
| 22 | + if(time == 0) { |
| 23 | + time++; |
| 24 | +Index: src/libs/lvgl/src/lv_misc/lv_anim.h |
| 25 | +IDEA additional info: |
| 26 | +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| 27 | +<+>UTF-8 |
| 28 | +=================================================================== |
| 29 | +diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.h b/src/libs/lvgl/src/lv_misc/lv_anim.h |
| 30 | +--- a/src/libs/lvgl/src/lv_misc/lv_anim.h (revision 12a3b6cc8ec1fd6b951c353ab3a5fbbb9934fdd4) |
| 31 | ++++ b/src/libs/lvgl/src/lv_misc/lv_anim.h (date 1610901672076) |
| 32 | +@@ -73,8 +73,8 @@ |
| 33 | + lv_anim_ready_cb_t ready_cb; /**< Call it when the animation is ready*/ |
| 34 | + int32_t start; /**< Start value*/ |
| 35 | + int32_t end; /**< End value*/ |
| 36 | +- uint16_t time; /**< Animation time in ms*/ |
| 37 | +- int16_t act_time; /**< Current time in animation. Set to negative to make delay.*/ |
| 38 | ++ uint32_t time; /**< Animation time in ms*/ |
| 39 | ++ int32_t act_time; /**< Current time in animation. Set to negative to make delay.*/ |
| 40 | + uint16_t playback_pause; /**< Wait before play back*/ |
| 41 | + uint16_t repeat_pause; /**< Wait before repeat*/ |
| 42 | + #if LV_USE_USER_DATA |
| 43 | +@@ -266,7 +266,7 @@ |
| 44 | + * @param end end value of the animation |
| 45 | + * @return the required time [ms] for the animation with the given parameters |
| 46 | + */ |
| 47 | +-uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end); |
| 48 | ++uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end); |
| 49 | + |
| 50 | + /** |
| 51 | + * Calculate the current value of an animation applying linear characteristic |
0 commit comments