From 1a0930a5ceac28b3a2a1e0f2a141a725fcb317df Mon Sep 17 00:00:00 2001 From: fvanroie Date: Sun, 23 Feb 2020 14:50:34 +0100 Subject: [PATCH] Fix dim to use guiBacklightPin --- src/hasp_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index dbe8c202..72bbce3a 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -260,6 +260,7 @@ void guiSetup(TFT_eSPI & screen, JsonObject settings) static lv_disp_buf_t disp_buf; lv_disp_buf_init(&disp_buf, guiVdbBuffer, NULL, buffer_size); #endif + debugPrintln(String(F("LVGL: MEM size : ")) + String(LV_MEM_SIZE)); debugPrintln(String(F("LVGL: VDB size : ")) + String((size_t)sizeof(lv_color_t) * buffer_size)); #if LV_USE_LOG != 0 @@ -374,7 +375,7 @@ void guiSetDim(uint8_t level) #if defined(ARDUINO_ARCH_ESP32) ledcWrite(0, map(guiDimLevel, 0, 100, 0, 1023)); // ledChannel and value #else - analogWrite(D1, map(guiDimLevel, 0, 100, 0, 1023)); + analogWrite(guiBacklightPin, map(guiDimLevel, 0, 100, 0, 1023)); #endif } else { guiDimLevel = -1;