1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

Reverse min and max in mapping reverse

This commit is contained in:
Adam Martini 2020-06-21 10:59:41 -07:00
parent 0d6b8a86d4
commit 5359a762b8

View File

@ -150,8 +150,8 @@ void lv_rotary_set_value(lv_obj_t * rotary, int16_t value, lv_anim_enable_t anim
if (ext->reverse) { if (ext->reverse) {
lv_arc_set_start_angle( lv_arc_set_start_angle(
rotary, rotary,
_lv_map(ext->cur_value, ext->min_value, ext->max_value, _lv_map(ext->cur_value, ext->max_value, ext->min_value,
360 + ext->arc.bg_angle_end, ext->arc.bg_angle_start) ext->arc.arc_angle_start, 360 + ext->arc.bg_angle_end)
); );
} else { } else {
lv_arc_set_end_angle( lv_arc_set_end_angle(