fix(shields): LVGL fixes for nice!view screen

* Bump the LVGL mem pool size needed for custom screen.
* Fixes for LVGL drawing/label usage.
This commit is contained in:
Peter Johanson 2023-11-15 16:06:21 -08:00 committed by Pete Johanson
parent 802881b625
commit 413820fc7f
2 changed files with 5 additions and 2 deletions

View file

@ -24,6 +24,9 @@ choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice endchoice
config LV_Z_MEM_POOL_SIZE
default 4096 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
imply NICE_VIEW_WIDGET_STATUS imply NICE_VIEW_WIDGET_STATUS

View file

@ -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++) { for (int i = 0; i < 5; i++) {
bool selected = i == state->active_profile_index; 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); &arc_dsc);
if (selected) { if (selected) {
@ -180,7 +180,7 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status
// Draw layer // Draw layer
if (state->layer_label == NULL) { if (state->layer_label == NULL) {
char text[9] = {}; char text[10] = {};
sprintf(text, "LAYER %i", state->layer_index); sprintf(text, "LAYER %i", state->layer_index);