Text Area/DDList/Roller Limitations

Hi,

Further to my post on the old forum(link below), I have located another typedef which needs to be changed from int16_t to int32_t at line 39 of lv_anim.h. For the roller to function correctly with animation enabled…

/*Type of the animated value*/
//typedef int16_t lv_anim_value_t;
typedef int32_t lv_anim_value_t;

https://forum.littlevgl.com/viewtopic.php?f=15&t=194

Kind Regards,

Pete

This was originally changed to int16_t here: https://github.com/littlevgl/lvgl/issues/1049

Hi @embeddedt,

I have just read that post and understand the problem when used with a 16-bit processor, but if you are using lv_coord_t defined as int32_t in ‘extreme cases’ like mine… as we discussed here…

https://forum.littlevgl.com/viewtopic.php?f=15&t=194

Then for the animations not to suffer overflow we also need to define the lv_anim_value_t to be signed 32-bits also.

Kind Regards,

Pete

Should we just typedef lv_anim_value_t to be an lv_coord_t then, because they are usually used together?

Hi @embeddedt that sounds like a very sensible solution.

Kind Regards,

Pete

Hi @embeddedt,

Can I propose that line 39 of lv_anim.h be changed to:

typedef lv_coord_t lv_anim_value_t;

Then this issue is resolved.

Kind Regards,

Pete

We need to check with @kisvegabor, but I don’t think that will be a problem.

As animations can animate any values I think it would be confusing to use the lv_coord_t as type. What about adding typedef int16_t lv_anim_value_t; to lv_conf.h?

I think it would be confusing to use the lv_coord_t as type. What about adding typedef int16_t lv_anim_value_t; to lv_conf.h?

I respectfully disagree. When lv_anim_value_t is written in code it doesn’t mention lv_coord_t at all.

Your suggestion would work, but the problem with that is that there are then two typedefs for related types. In general, I think it’s better to consolidate the typedefs.

This seems to be leading back to the discussions we had about lv_int_t. :slight_smile:

@embeddedt

Sorry, I didn’t notice you comment. Please ping me if don’t answer for so long. :slight_smile:

Your suggestion would work, but the problem with that is that there are then two typedefs for related types. In general, I think it’s better to consolidate the typedef s.
This seems to be leading back to the discussions we had about lv_int_t . :slight_smile:

Okay, let’s use typedef lv_coord_t lv_anim_value_t;. I added it here