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

fix conflicts

This commit is contained in:
Gabor Kiss-Vamosi 2020-09-04 13:10:44 +02:00
commit 15e692d596
5 changed files with 8 additions and 43 deletions

View File

@ -8,6 +8,7 @@
### Bugfixes
- Fix unexpeted DEFOCUS on lv_page when clicking to bg after the scrollable
- Fix `lv_obj_del` and `lv_obj_clean` if the children list changed during deletion.
## v7.4.0 (01.09.2020)

View File

@ -653,7 +653,7 @@ typedef void * lv_obj_user_data_t;
* 1: Some extra precision
* 2: Best precision
*/
# define LV_LINEMETER_PRECISE 0
# define LV_LINEMETER_PRECISE 1
#endif
/*Mask (dependencies: -)*/

View File

@ -486,13 +486,9 @@ void lv_obj_clean(lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
lv_obj_t * child = lv_obj_get_child(obj, NULL);
lv_obj_t * child_next;
while(child) {
/* Read the next child before deleting the current
* because the next couldn't be read from a deleted (invalid) node*/
child_next = lv_obj_get_child(obj, child);
lv_obj_del(child);
child = child_next;
child = lv_obj_get_child(obj, NULL); /*Get the new first child*/
}
}
@ -3710,17 +3706,13 @@ static void obj_del_core(lv_obj_t * obj)
/*Recursively delete the children*/
lv_obj_t * i;
lv_obj_t * i_next;
i = _lv_ll_get_head(&(obj->child_ll));
while(i != NULL) {
/*Get the next object before delete this*/
i_next = _lv_ll_get_next(&(obj->child_ll), i);
/*Call the recursive del to the child too*/
/*Call the recursive delete to the child too*/
obj_del_core(i);
/*Set i to the next node*/
i = i_next;
/*Set i to the new head node*/
i = _lv_ll_get_head(&(obj->child_ll));
}
lv_event_mark_deleted(obj);

View File

@ -400,36 +400,7 @@ void lv_arc_set_value(lv_obj_t * arc, int16_t value)
if(ext->cur_value == new_value) return;
ext->cur_value = new_value;
int16_t bg_midpoint, range_midpoint, bg_end = ext->bg_angle_end;
if(ext->bg_angle_end < ext->bg_angle_start) bg_end = ext->bg_angle_end + 360;
int16_t angle;
switch(ext->type) {
case LV_ARC_TYPE_SYMMETRIC:
bg_midpoint = (ext->bg_angle_start + bg_end) / 2;
range_midpoint = (int32_t)(ext->min_value + ext->max_value) / 2;
if(ext->cur_value < range_midpoint) {
angle = _lv_map(ext->cur_value, ext->min_value, range_midpoint, ext->bg_angle_start, bg_midpoint);
lv_arc_set_start_angle(arc, angle);
lv_arc_set_end_angle(arc, bg_midpoint);
}
else {
angle = _lv_map(ext->cur_value, range_midpoint, ext->max_value, bg_midpoint, bg_end);
lv_arc_set_start_angle(arc, bg_midpoint);
lv_arc_set_end_angle(arc, angle);
}
break;
case LV_ARC_TYPE_REVERSE:
angle = _lv_map(ext->cur_value, ext->min_value, ext->max_value, ext->bg_angle_start, bg_end);
lv_arc_set_start_angle(arc, angle);
break;
default: /** LV_ARC_TYPE_NORMAL*/
angle = _lv_map(ext->cur_value, ext->min_value, ext->max_value, ext->bg_angle_start, bg_end);
lv_arc_set_start_angle(arc, ext->bg_angle_start);
lv_arc_set_end_angle(arc, angle);
}
ext->last_angle = angle; /*Cache angle for slew rate limiting*/
value_update(arc);
}
/**

View File

@ -76,6 +76,7 @@ lv_obj_t * lv_linemeter_create(lv_obj_t * par, const lv_obj_t * copy)
ext->line_cnt = 18;
ext->scale_angle = 240;
ext->angle_ofs = 0;
ext->mirrored = 0;
/*The signal and design functions are not copied so set them here*/
lv_obj_set_signal_cb(linemeter, lv_linemeter_signal);