From 5359a762b8a47a66791b130e670c63abf98abd1f Mon Sep 17 00:00:00 2001 From: Adam Martini Date: Sun, 21 Jun 2020 10:59:41 -0700 Subject: [PATCH] Reverse min and max in mapping reverse --- src/lv_widgets/lv_rotary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_widgets/lv_rotary.c b/src/lv_widgets/lv_rotary.c index f8cc7641e..629ade3aa 100644 --- a/src/lv_widgets/lv_rotary.c +++ b/src/lv_widgets/lv_rotary.c @@ -150,8 +150,8 @@ void lv_rotary_set_value(lv_obj_t * rotary, int16_t value, lv_anim_enable_t anim if (ext->reverse) { lv_arc_set_start_angle( rotary, - _lv_map(ext->cur_value, ext->min_value, ext->max_value, - 360 + ext->arc.bg_angle_end, ext->arc.bg_angle_start) + _lv_map(ext->cur_value, ext->max_value, ext->min_value, + ext->arc.arc_angle_start, 360 + ext->arc.bg_angle_end) ); } else { lv_arc_set_end_angle(