From 73bfa5f5dd83a0daca5c96978003ec9fea437ddc Mon Sep 17 00:00:00 2001 From: "Chow Castro, Marcos" Date: Thu, 28 Nov 2024 17:39:19 +0100 Subject: [PATCH] view selected profile fixed. Points are now shown instead of numbers. --- boards/shields/nice_oled/widgets/profile.c | 10 +++++----- boards/shields/nice_oled/widgets/wpm.c | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/boards/shields/nice_oled/widgets/profile.c b/boards/shields/nice_oled/widgets/profile.c index 7a51999..a1057eb 100644 --- a/boards/shields/nice_oled/widgets/profile.c +++ b/boards/shields/nice_oled/widgets/profile.c @@ -10,7 +10,7 @@ static void draw_inactive_profiles(lv_obj_t *canvas, lv_draw_img_dsc_t img_dsc; lv_draw_img_dsc_init(&img_dsc); - lv_canvas_draw_img(canvas, 0, 138, &profiles, &img_dsc); + lv_canvas_draw_img(canvas, 0, 137, &profiles, &img_dsc); // lv_canvas_draw_img(canvas, 18, 129, &profiles, &img_dsc); } @@ -21,7 +21,7 @@ static void draw_active_profile(lv_obj_t *canvas, int offset = state->active_profile_index * 7; - lv_canvas_draw_rect(canvas, 0 + offset, 138, 3, 3, &rect_white_dsc); + lv_canvas_draw_rect(canvas, 0 + offset, 137, 3, 3, &rect_white_dsc); // lv_canvas_draw_rect(canvas, 18 + offset, 129, 3, 3, &rect_white_dsc); } @@ -39,7 +39,7 @@ static void draw_active_profile_text(lv_obj_t *canvas, } void draw_profile_status(lv_obj_t *canvas, const struct status_state *state) { - draw_active_profile_text(canvas, state); - // draw_inactive_profiles(canvas, state); - // draw_active_profile(canvas, state); + // draw_active_profile_text(canvas, state); + draw_inactive_profiles(canvas, state); + draw_active_profile(canvas, state); } diff --git a/boards/shields/nice_oled/widgets/wpm.c b/boards/shields/nice_oled/widgets/wpm.c index e4e278a..b08c771 100644 --- a/boards/shields/nice_oled/widgets/wpm.c +++ b/boards/shields/nice_oled/widgets/wpm.c @@ -78,8 +78,8 @@ static void draw_grid(lv_obj_t *canvas) { lv_draw_img_dsc_t img_dsc; lv_draw_img_dsc_init(&img_dsc); - lv_canvas_draw_img(canvas, -1, 100, &grid, &img_dsc); - // lv_canvas_draw_img(canvas, 0, 65, &grid, &img_dsc); + lv_canvas_draw_img(canvas, -1, 95, &grid, &img_dsc); + // lv_canvas_draw_img(canvas, -1, 100, &grid, &img_dsc); } static void draw_graph(lv_obj_t *canvas, const struct status_state *state) { @@ -101,7 +101,8 @@ static void draw_graph(lv_obj_t *canvas, const struct status_state *state) { } // modificar aqui par la posicion de la grafica points[i].x = -36 + i * 7.4; - points[i].y = 132 - (value * 32 / max); + points[i].y = 127 - (value * 32 / max); + // points[i].y = 132 - (value * 32 / max); } #else int max = 0;