From d97d2636204e62539431f16542e4cd59e660dfe7 Mon Sep 17 00:00:00 2001 From: Klaus Musch Date: Sun, 21 Jan 2024 20:05:49 +0100 Subject: [PATCH] changed bufA and bufB from static to dynamic allocated memory to safe static DRAM (#57) --- Platformio/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Platformio/src/main.cpp b/Platformio/src/main.cpp index 4e82c51..fa3a055 100644 --- a/Platformio/src/main.cpp +++ b/Platformio/src/main.cpp @@ -77,8 +77,8 @@ int backlight_brightness = 255; // LVGL declarations static lv_disp_draw_buf_t draw_buf; -static lv_color_t bufA[ screenWidth * screenHeight / 10 ]; -static lv_color_t bufB[ screenWidth * screenHeight / 10 ]; +lv_color_t * bufA = (lv_color_t *) malloc(sizeof(lv_color_t) * screenWidth * screenHeight / 10); +lv_color_t * bufB = (lv_color_t *) malloc(sizeof(lv_color_t) * screenWidth * screenHeight / 10); lv_obj_t* objBattPercentage; lv_obj_t* objBattIcon; LV_IMG_DECLARE(gradientLeft);