diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index f24d07e181..27a61447f6 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -2882,7 +2882,6 @@ void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data) } #endif -#if LV_USE_GROUP /** * Get the group of the object * @param obj pointer to an object @@ -2892,7 +2891,11 @@ void * lv_obj_get_group(const lv_obj_t * obj) { LV_ASSERT_OBJ(obj, LV_OBJX_NAME); +#if LV_USE_GROUP return obj->group_p; +#else + return NULL; +#endif } /** @@ -2904,13 +2907,15 @@ bool lv_obj_is_focused(const lv_obj_t * obj) { LV_ASSERT_OBJ(obj, LV_OBJX_NAME); +#if LV_USE_GROUP if(obj->group_p) { if(lv_group_get_focused(obj->group_p) == obj) return true; } - return false; -} +#else + return false; #endif +} /*------------------- diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2e526bafe0..b41a8b079b 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -1383,7 +1383,6 @@ void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data); #endif -#if LV_USE_GROUP /** * Get the group of the object * @param obj pointer to an object @@ -1398,8 +1397,6 @@ void * lv_obj_get_group(const lv_obj_t * obj); */ bool lv_obj_is_focused(const lv_obj_t * obj); -#endif - /*------------------- * OTHER FUNCTIONS *------------------*/ diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 95868d4adc..da664f6ac1 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -243,6 +243,13 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); */ bool lv_disp_get_antialiasing(lv_disp_t * disp); +/** + * Get the DPI of the display + * @param disp pointer to a display (NULL to use the default display) + * @return dpi of the display + */ +uint32_t lv_disp_get_dpi(lv_disp_t * disp); + /** * Get the size category of the display based on it's hor. res. and dpi. * @param disp pointer to a display (NULL to use the default display) diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index 926cc1e23c..7f2037371a 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -160,7 +160,6 @@ void * lv_mem_alloc(size_t size) #endif void * alloc = NULL; - printf("alloc: %d\n", size); #if LV_MEM_CUSTOM == 0 /*Use the built-in allocators*/ lv_mem_ent_t * e = NULL; @@ -786,7 +785,6 @@ static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e) static void * ent_alloc(lv_mem_ent_t * e, size_t size) { void * alloc = NULL; - printf("%s, size:%d\n", e->header.s.used == 0 ? "free" : "used", e->header.s.d_size); /*If the memory is free and big enough then use it */ if(e->header.s.used == 0 && e->header.s.d_size >= size) { /*Truncate the entry to the desired size */ diff --git a/src/lv_widgets/lv_cont.c b/src/lv_widgets/lv_cont.c index 9b91edd329..cd2ce3f5d1 100644 --- a/src/lv_widgets/lv_cont.c +++ b/src/lv_widgets/lv_cont.c @@ -243,7 +243,7 @@ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont) /********************** * STATIC FUNCTIONS **********************/ -extern uint32_t cont_sign; + /** * Signal function of the container * @param cont pointer to a container object @@ -528,7 +528,6 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) break; } w_row += w + pinner; /*Add the object width + inner padding*/ - lv_coord_t child_h = lv_obj_get_height(child_rc); lv_coord_t h = lv_obj_get_height(child_rc); h += lv_obj_get_style_margin_top(child_rc, LV_OBJ_PART_MAIN);