mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
Fix bg_end init
This commit is contained in:
parent
f0cae00574
commit
83d05f945f
@ -141,7 +141,7 @@ void lv_rotary_set_type(lv_obj_t * rotary, lv_rotary_type_t type)
|
|||||||
ext->type = type;
|
ext->type = type;
|
||||||
ext->cur_value = -1; /** Force set_value handling*/
|
ext->cur_value = -1; /** Force set_value handling*/
|
||||||
|
|
||||||
int16_t bg_end, bg_midpoint;
|
int16_t bg_midpoint, bg_end = ext->arc.bg_angle_end;
|
||||||
if (ext->arc.bg_angle_end < ext->arc.bg_angle_start) bg_end = ext->arc.bg_angle_end + 360;
|
if (ext->arc.bg_angle_end < ext->arc.bg_angle_start) bg_end = ext->arc.bg_angle_end + 360;
|
||||||
|
|
||||||
switch(ext->type) {
|
switch(ext->type) {
|
||||||
@ -180,7 +180,7 @@ void lv_rotary_set_value(lv_obj_t * rotary, int16_t value, lv_anim_enable_t anim
|
|||||||
if(ext->cur_value == new_value) return;
|
if(ext->cur_value == new_value) return;
|
||||||
ext->cur_value = new_value;
|
ext->cur_value = new_value;
|
||||||
|
|
||||||
int16_t bg_end, bg_midpoint, range_midpoint;
|
int16_t bg_midpoint, range_midpoint, bg_end = ext->arc.bg_angle_end;
|
||||||
if (ext->arc.bg_angle_end < ext->arc.bg_angle_start) bg_end = ext->arc.bg_angle_end + 360;
|
if (ext->arc.bg_angle_end < ext->arc.bg_angle_start) bg_end = ext->arc.bg_angle_end + 360;
|
||||||
|
|
||||||
switch(ext->type) {
|
switch(ext->type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user