From 64a2a85077470100f560de621666cfed2a2fbe6e Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 4 Dec 2018 18:54:26 +0200 Subject: [PATCH] Compilation error fixes --- lv_core/lv_refr.c | 1 - lv_objx/lv_chart.c | 2 -- lv_objx/lv_imgbtn.c | 5 +++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 766c6e2e9..63c9bdc86 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -514,7 +514,6 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) if(union_ok != false) { /* Redraw the object */ - lv_style_t * style = lv_obj_get_style(obj); obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN); //tick_wait_ms(100); /*DEBUG: Wait after every object draw to see the order of drawing*/ diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index b3ac83880..92e09a400 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -731,7 +731,6 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) col_a.y2 = chart->coords.y2; lv_coord_t x_act; - printf("\n", y_tmp); /*Go through all points*/ for(i = 0; i < ext->point_cnt; i ++) { @@ -749,7 +748,6 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) lv_coord_t p_act = (ser->start_point + i) % ext->point_cnt; y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); - printf("ytmp:%d\n", y_tmp); col_a.y1 = h - y_tmp + chart->coords.y1; mask_ret = lv_area_intersect(&col_mask, mask, &col_a); diff --git a/lv_objx/lv_imgbtn.c b/lv_objx/lv_imgbtn.c index b7e061fb2..5bec801f1 100644 --- a/lv_objx/lv_imgbtn.c +++ b/lv_objx/lv_imgbtn.c @@ -81,10 +81,11 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) } /*Copy an existing image button*/ else { - lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy); #if LV_IMGBTN_TILED == 0 memset(ext->img_src, 0, sizeof(ext->img_src)); #else + lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy); + memcpy(ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left)); memcpy(ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid)); memcpy(ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right)); @@ -163,7 +164,7 @@ void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t * */ const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_btn_state_t state) { - lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); +// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); return NULL;//ext->img_src[state]; }