Skip to content

Commit

Permalink
view selected profile fixed. Points are now shown instead of numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
mctechnology17 committed Nov 28, 2024
1 parent 2a90780 commit 73bfa5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions boards/shields/nice_oled/widgets/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}
7 changes: 4 additions & 3 deletions boards/shields/nice_oled/widgets/wpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 73bfa5f

Please sign in to comment.