About the arc(bug?)

When the range setting is small.Set the arc is adjustable.
Where the arc starts and ends, it doesn’t work.(V7.10.1)
The code is as follows:

lv_obj_t* arc = lv_arc_create(lv_scr_act(), NULL);
lv_arc_set_adjustable(arc, true);//Set whether the arc is adjustable
lv_arc_set_rotation(arc, 90);//0 degree position
lv_obj_set_size(arc, 300, 300);
lv_obj_align(arc, NULL, LV_ALIGN_CENTER, 0, 0);
lv_arc_set_bg_angles(arc, 0, 360);
lv_arc_set_range(arc, 0, 4);
lv_arc_set_value(arc, 2);


Won’t you have this problem?

I’ve tested it. To fix this add lv_arc_set_chg_rate(arc, 800);

The problem was that with a small change rate the arc couldn’t “grow” fast enough to jump to the next value. Therefore it sucked at the same value.

Hmm… wouldn’t it make sense to ignore the change rate when the arc is being dragged with a finger?

Thank you very much.
Add lv_arc_set_chg_rate(arc, 800); There are still problems because 800 is still too small.
lv_arc_set_chg_rate(arc, 3000); The problem is solved.

1 Like

Actually, the change rate is used only when the arc is set by a finger.