diff --git a/lv_conf_templ.h b/lv_conf_templ.h index f4575c272..9f052c9f5 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -72,9 +72,6 @@ #define LV_TXT_UTF8 1 #define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ -/*Group settings*/ -#define LV_GROUP 1 /*Enable object groups (for keyboards)*/ - /*Graphics feature usage*/ #define LV_NO_ANIM 0 /*1: disable all animations*/ #define LV_NO_SHADOW 0 /*1: disable shadows*/ @@ -155,6 +152,7 @@ *==================*/ #define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/ #define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/ +#define LV_OBJ_GROUP 1 /*Enable object groups (for keyboards)*/ /*================== * LV OBJ X USAGE diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 84c5d3beb..4c2036172 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_group.h" -#if LV_GROUP != 0 +#if LV_OBJ_GROUP != 0 #include /********************* @@ -267,4 +267,4 @@ static void style_mod_def(lv_style_t * style) style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); } -#endif /*LV_GROUP != 0*/ +#endif /*LV_OBJ_GROUP != 0*/ diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index c0ef3a181..98179754b 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -30,7 +30,7 @@ extern "C" { #define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ #define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ -#if LV_GROUP != 0 +#if LV_OBJ_GROUP != 0 /********************** * TYPEDEFS **********************/ @@ -125,7 +125,7 @@ lv_obj_t * lv_group_get_focused(lv_group_t * group); * MACROS **********************/ -#endif /*LV_GROUP != 0*/ +#endif /*LV_OBJ_GROUP != 0*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 5c1c03c18..f072dc433 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -128,7 +128,7 @@ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj) lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y); } -#if LV_GROUP +#if LV_OBJ_GROUP /** * Set a destination group for a keypad input device * @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD') @@ -239,7 +239,7 @@ static void indev_proc_task(void * param) indev_proc_point(&i->proc); } else if (i->driver.type == LV_INDEV_TYPE_KEYPAD) { -#if LV_GROUP != 0 +#if LV_OBJ_GROUP if(i->group != NULL && data.key != 0 && data.state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_REL) { diff --git a/lv_core/lv_indev.h b/lv_core/lv_indev.h index 462eef6a7..93c9964e8 100644 --- a/lv_core/lv_indev.h +++ b/lv_core/lv_indev.h @@ -66,7 +66,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable); */ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj); -#if LV_GROUP +#if LV_OBJ_GROUP /** * Set a destination group for a keypad input device * @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD') diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index f463a44f6..7cb7ac006 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -146,7 +146,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) new_obj->free_ptr = NULL; #endif -#if LV_GROUP != 0 +#if LV_OBJ_GROUP new_obj->group_p = NULL; #endif /*Set attributes*/ @@ -191,7 +191,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) #if LV_OBJ_FREE_PTR != 0 new_obj->free_ptr = NULL; #endif -#if LV_GROUP != 0 +#if LV_OBJ_GROUP new_obj->group_p = NULL; #endif @@ -229,7 +229,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) new_obj->style_p = copy->style_p; -#if LV_GROUP != 0 +#if LV_OBJ_GROUP /*Add to the same group*/ if(copy->group_p != NULL) { lv_group_add_obj(copy->group_p, new_obj); @@ -1204,7 +1204,7 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj) par = par->par; } } -#if LV_GROUP != 0 +#if LV_OBJ_GROUP if(obj->group_p) { if(lv_group_get_focused(obj->group_p) == obj) { style_act = lv_group_mod_style(obj->group_p, style_act); @@ -1361,7 +1361,7 @@ void * lv_obj_get_free_ptr(lv_obj_t * obj) } #endif -#if LV_GROUP != 0 +#if LV_OBJ_GROUP /** * Get the group of the object * @param obj pointer to an object @@ -1537,7 +1537,7 @@ static void delete_children(lv_obj_t * obj) #endif /*Delete from the group*/ -#if LV_GROUP != 0 +#if LV_OBJ_GROUP if(obj->group_p != NULL) lv_group_remove_obj(obj); #endif diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 8ad8affff..6552ae49d 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -774,7 +774,7 @@ LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(lv_obj_t * obj); void * lv_obj_get_free_ptr(lv_obj_t * obj); #endif -#if LV_GROUP != 0 +#if LV_OBJ_GROUP /** * Get the group of the object * @param obj pointer to an object diff --git a/lv_draw/lv_draw_vbasic.c b/lv_draw/lv_draw_vbasic.c index 722fd2742..5cc29cc07 100644 --- a/lv_draw/lv_draw_vbasic.c +++ b/lv_draw/lv_draw_vbasic.c @@ -454,12 +454,14 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_coord_t map_col_end = masked_a.x2 >> 1; lv_coord_t vdb_col; /*Col. in this row*/ lv_coord_t vdb_col2; /*Col. in next row*/ + for(row = masked_a.y1; row <= masked_a.y2; row += 2) { map_col_start = masked_a.x1 >> 1; map_col_end = masked_a.x2 >> 1; vdb_col = masked_a.x1; vdb_col2 = masked_a.x1 + vdb_width; for(map_col = map_col_start; map_col <= map_col_end; map_col ++, vdb_col += 2, vdb_col2 += 2) { + vdb_buf_tmp[vdb_col].full = map_p[map_col].full; vdb_buf_tmp[vdb_col + 1].full = map_p[map_col].full; vdb_buf_tmp[vdb_col2].full = map_p[map_col].full; diff --git a/lv_misc/lv_mem.c b/lv_misc/lv_mem.c index 59b6cbe32..dc5dbe466 100644 --- a/lv_misc/lv_mem.c +++ b/lv_misc/lv_mem.c @@ -19,7 +19,7 @@ /********************* * DEFINES *********************/ -#define LV_MEM_ADD_JUNK 1 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ +#define LV_MEM_ADD_JUNK 0 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ /********************** * TYPEDEFS diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 5b145a56d..c01726878 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -247,7 +247,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig if(mode == LV_DESIGN_COVER_CHK) { return ancestor_bullet_design(bullet, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if LV_GROUP != 0 +#if LV_OBJ_GROUP /* If the check box is the active in a group and * the background is not visible (transparent or empty) * then activate the style of the bullet*/ @@ -265,7 +265,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig #endif ancestor_bullet_design(bullet, mask, mode); -#if LV_GROUP != 0 +#if LV_OBJ_GROUP bullet->style_p = style_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index fe10b5781..de4f7a53d 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -629,7 +629,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ lv_style_t * style = lv_obj_get_style(label); lv_obj_get_coords(label, &cords); -#if LV_GROUP != 0 +#if LV_OBJ_GROUP lv_group_t * g = lv_obj_get_group(label); if(lv_group_get_focused(g) == label) { lv_draw_rect(&cords, mask, style); diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index dd407cf15..922fd73e2 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -242,7 +242,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig memcpy(&style_tmp, style, sizeof(lv_style_t)); -#if LV_GROUP +#if LV_OBJ_GROUP lv_group_t *g = lv_obj_get_group(lmeter); if(lv_group_get_focused(g) == lmeter) { style_tmp.line.width += 1 << LV_ANTIALIAS; diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index f4a7f6fed..5f3298011 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -412,7 +412,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo if(mode == LV_DESIGN_COVER_CHK) { return ancestor_design(scrl, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if LV_GROUP != 0 +#if LV_OBJ_GROUP /* If the page is the active in a group and * the background (page) is not visible (transparent or empty) * then activate the style of the scrollable*/ @@ -430,7 +430,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo #endif ancestor_design(scrl, mask, mode); -#if LV_GROUP != 0 +#if LV_OBJ_GROUP scrl->style_p = style_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 74e447224..808fdf3fa 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -78,7 +78,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->drag_hor = 0; - ext->draging = 0;; + ext->draging = 0; ext->slide_enable = 1; ext->tab_cur = 0; ext->point_last.x = 0;