From 87046eadf093b26be69aa8f2de320130ff3fd12a Mon Sep 17 00:00:00 2001 From: Claude Worker claude2 Date: Wed, 10 Jun 2026 13:20:59 +0200 Subject: [PATCH] fix(box3): BOX-3 BSP + backlight The project depended on espressif/esp-box (first-gen BOX: ST7789 + TT21100 touch), which mis-initialises a real ESP32-S3-BOX-3 (ILI9341 + GT911) and leaves the screen black. Switch the dependency to espressif/esp-box-3 and use the generic bsp/esp-bsp.h header. Also: the voice app started the display but never lit the backlight ("LCD backlight must be enabled separately" per the BSP). plip_ui_init now calls bsp_display_brightness_init()/set(100) and uses a dark-blue background with white text so the UI is actually visible. Resolves clean (esp-box-3 3.2.0, esp_lcd_ili9341 2.0.2, esp_lcd_touch_gt911 1.2.0); build green. --- box3_voice/main/idf_component.yml | 13 ++++--------- box3_voice/main/plip_ui.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/box3_voice/main/idf_component.yml b/box3_voice/main/idf_component.yml index ea4d95e..d501242 100644 --- a/box3_voice/main/idf_component.yml +++ b/box3_voice/main/idf_component.yml @@ -1,15 +1,10 @@ dependencies: - espressif/esp-box: + # ESP32-S3-BOX-3 board support (ILI9341 LCD + GT911 touch). The original + # `espressif/esp-box` BSP targets the first-gen BOX (ST7789/TT21100) and + # leaves a BOX-3 screen black — this is the matching BSP. + espressif/esp-box-3: version: ">=1.2.0" espressif/esp-sr: version: ">=1.4.0" - espressif/esp_codec_dev: - # 1.3.x+ moved to driver_ng i2c, conflicting with esp-box 1.x legacy BSP. - # Pin to the last 1.2 release that still uses the legacy driver. - version: "1.2.0" - espressif/button: - # esp-box 1.x bsp uses the old button_config_t.custom_button_config API; - # button v3.x removed it. Pin to the last 2.x release for compat. - version: "~2.5.0" espressif/esp_websocket_client: version: ">=1.0.0" diff --git a/box3_voice/main/plip_ui.c b/box3_voice/main/plip_ui.c index 35b7e23..9b45b6d 100644 --- a/box3_voice/main/plip_ui.c +++ b/box3_voice/main/plip_ui.c @@ -9,7 +9,7 @@ #include -#include "bsp/esp-box.h" +#include "bsp/esp-bsp.h" #include "esp_log.h" #include "lvgl.h" @@ -181,8 +181,14 @@ esp_err_t plip_ui_init(void) return ESP_FAIL; } + // The voice app starts the display but never lights the backlight — turn + // it on (and to full brightness) or the whole UI is invisible. + bsp_display_brightness_init(); + bsp_display_brightness_set(100); + lv_obj_t *scr = lv_screen_active(); - lv_obj_set_style_bg_color(scr, lv_color_black(), 0); + lv_obj_set_style_bg_color(scr, lv_color_hex(0x101020), 0); + lv_obj_set_style_text_color(scr, lv_color_white(), 0); // Content area above the fixed bottom button. lv_obj_t *content = lv_obj_create(scr);