Skip to content

Commit

Permalink
fix(shields): LVGL fixes for nice!view screen
Browse files Browse the repository at this point in the history
* Bump the LVGL mem pool size needed for custom screen.
* Fixes for LVGL drawing/label usage.
  • Loading branch information
petejohanson committed Nov 16, 2023
1 parent 2ab9363 commit 985b5ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/boards/shields/nice_view/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice

config LV_Z_MEM_POOL_SIZE
default 4096 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM

config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
imply NICE_VIEW_WIDGET_STATUS

Expand Down
4 changes: 2 additions & 2 deletions app/boards/shields/nice_view/widgets/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status
for (int i = 0; i < 5; i++) {
bool selected = i == state->active_profile_index;

lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 359,
lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 360,
&arc_dsc);

if (selected) {
Expand Down Expand Up @@ -180,7 +180,7 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status

// Draw layer
if (state->layer_label == NULL) {
char text[9] = {};
char text[10] = {};

sprintf(text, "LAYER %i", state->layer_index);

Expand Down

0 comments on commit 985b5ef

Please sign in to comment.