mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(anim): fix lv_anim_set_repeat_count configuration parameter may be truncated
Signed-off-by: bailinjiang <915290475@qq.com>
This commit is contained in:
parent
150d1a1d37
commit
6e3f6866cb
@ -94,7 +94,7 @@ void lv_animimg_set_duration(lv_obj_t * obj, uint32_t duration)
|
|||||||
lv_anim_set_playback_delay(&animimg->anim, duration);
|
lv_anim_set_playback_delay(&animimg->anim, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_animimg_set_repeat_count(lv_obj_t * obj, uint32_t count)
|
void lv_animimg_set_repeat_count(lv_obj_t * obj, uint16_t count)
|
||||||
{
|
{
|
||||||
LV_ASSERT_OBJ(obj, MY_CLASS);
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
lv_animimg_t * animimg = (lv_animimg_t *)obj;
|
lv_animimg_t * animimg = (lv_animimg_t *)obj;
|
||||||
@ -126,7 +126,7 @@ uint32_t lv_animimg_get_duration(lv_obj_t * obj)
|
|||||||
return lv_anim_get_time(&animimg->anim);
|
return lv_anim_get_time(&animimg->anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t lv_animimg_get_repeat_count(lv_obj_t * obj)
|
uint16_t lv_animimg_get_repeat_count(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
LV_ASSERT_OBJ(obj, MY_CLASS);
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
lv_animimg_t * animimg = (lv_animimg_t *)obj;
|
lv_animimg_t * animimg = (lv_animimg_t *)obj;
|
||||||
|
@ -93,7 +93,7 @@ void lv_animimg_set_duration(lv_obj_t * img, uint32_t duration);
|
|||||||
* @param img pointer to an animation image object
|
* @param img pointer to an animation image object
|
||||||
* @param count the number of times to repeat the animation
|
* @param count the number of times to repeat the animation
|
||||||
*/
|
*/
|
||||||
void lv_animimg_set_repeat_count(lv_obj_t * img, uint32_t count);
|
void lv_animimg_set_repeat_count(lv_obj_t * img, uint16_t count);
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* Getter functions
|
* Getter functions
|
||||||
@ -125,7 +125,7 @@ uint32_t lv_animimg_get_duration(lv_obj_t * img);
|
|||||||
* @param img pointer to an animation image object
|
* @param img pointer to an animation image object
|
||||||
* @return the repeat count
|
* @return the repeat count
|
||||||
*/
|
*/
|
||||||
uint32_t lv_animimg_get_repeat_count(lv_obj_t * img);
|
uint16_t lv_animimg_get_repeat_count(lv_obj_t * img);
|
||||||
|
|
||||||
#endif /*LV_USE_ANIMIMG*/
|
#endif /*LV_USE_ANIMIMG*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user