Fix uDisplay case 'T' union corruption for I80 parallel displays + WT32-SC01 Plus descriptor#24506
Fix uDisplay case 'T' union corruption for I80 parallel displays + WT32-SC01 Plus descriptor#24506lz64 wants to merge 1 commit intoarendst:developmentfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a long-standing Universal Display descriptor parsing issue where :T... lines could corrupt non-EPD panel configurations (notably I80 parallel pin mappings), fixes a compile break in the LVGL driver when USE_BERRY_LVGL_PANEL is enabled, and adds a verified display descriptor for the WT32-SC01 Plus (ST7796, I80 8-bit, FT5206 touch).
Changes:
- Guard
:T(EPD timing) parsing in the uDisplay descriptor parser to prevent config-union corruption on non-EPD displays. - Remove a dead
berry.lvgl_panel_loadedreference that causes compilation failures underUSE_BERRY_LVGL_PANEL. - Add a new WT32-SC01 Plus ST7796 PAR8 display descriptor (including I80 byte order and FT5206 touch line).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tasmota/tasmota_xdrv_driver/xdrv_54_lvgl.ino |
Removes obsolete Berry LVGL panel flag reference that no longer exists. |
tasmota/displaydesc/WT32-SC01-Plus_ST7796_p8_display.ini |
Adds a descriptor for WT32-SC01 Plus (ST7796, PAR8) including color byte order and touch line. |
lib/lib_display/UDisplay/src/uDisplay.cpp |
Changes :T parsing behavior to avoid union corruption from non-EPD :TI/:TS descriptor lines. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…WT32-SC01 Plus descriptor - Skip :TI (touch I2C) and :TS (touch SPI) lines in case 'T' of the uDisplay descriptor parser. These touch config lines are handled separately by xdsp_17_universal.ino via strstr(), but case 'T' was matching on the first character and unconditionally writing the subsequent values into panel_config->epd.lut_full_time/lut_partial_time/update_time. In the PanelConfigUnion, these EPD fields overlap with I80 panel bus pin config (cs_pin, dc_pin, wr_pin, rd_pin, data_pins), causing parallel displays to silently receive corrupted GPIO pin assignments and fail to render. The fix checks if the character after 'T' is 'I' or 'S' and skips EPD timing parsing for those lines. EPD descriptors using :T,<timing> continue to work as before. - Remove dead reference to berry.lvgl_panel_loaded in xdrv_54_lvgl.ino. The member was removed from BerrySupport in commit e4c2cf5 (Berry Extension Manager) but the reference in start_lvgl() was left behind, causing a compile error when USE_BERRY_LVGL_PANEL is defined. - Add verified display descriptor for WT32-SC01 Plus (ESP32-S3, ST7796U 480x320, 8-bit parallel I80, FT5206 capacitive touch). Tested on Tasmota v15.3.0.1 with LVGL 9.5.0.
f22f4c4 to
6cb82e0
Compare
|
Good catch — you're absolutely right that Updated the fix to check the character after case 'T':
// :TI and :TS are touch config lines handled by xdsp_17_universal.ino
// Only parse EPD timing when the line is :T,<number> (EPD timing values)
if (*lp1 != 'I' && *lp1 != 'S') {
panel_config->epd.lut_full_time = next_val(&lp1);
panel_config->epd.lut_partial_time = next_val(&lp1);
panel_config->epd.update_time = next_val(&lp1);
}
break;At the point
Force-pushed the corrected commit. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description:
Fix:
case 'T'in uDisplay descriptor parser corrupts I80 parallel display pin configThe descriptor parser's
case 'T'(EPD timing) unconditionally writes topanel_config->epd.lut_full_time,lut_partial_time, andupdate_timeregardless of interface type. In thePanelConfigUnion, these EPD fields overlap with I80 panel bus pin config (cs_pin,dc_pin,wr_pin,rd_pin,data_pins_low[]).Any non-EPD display with a
:Tprefixed line in its descriptor (e.g.,:TIfor old-style touch init) hitscase 'T'and corrupts the I80 pin configuration. The display initializes without error but sends data to wrong GPIO pins, resulting in a blank screen.Root cause: The
:TI1,38,5,6,7,4touch descriptor line is parsed bycase 'T', which writes the touch I2C address (38) and SDA pin (5) over the I80 bus WR and D0 pin values in the union.Fix: Guard the EPD timing writes with
if (ep_mode)so they only execute for EPD displays.Debug evidence (added temporary AddLog after PAR pin parsing):
Fix: Remove dead
berry.lvgl_panel_loadedreferenceCommit e4c2cf5 (Berry Extension Manager) removed
lvgl_panel_loadedfrom theBerrySupportclass but left a reference inxdrv_54_lvgl.inoline 488 inside#ifdef USE_BERRY_LVGL_PANEL. This causes a compile error whenUSE_BERRY_LVGL_PANELis defined.New: WT32-SC01 Plus (ST7796 parallel 8-bit) display descriptor
Verified working display descriptor for the Wireless Tag WT32-SC01 Plus development board:
:B,40,2for correct color byte order on I80 busTested on Tasmota v15.3.0.1 with LVGL 9.5.0.
Checklist:
NOTE: ESP8266 checkbox left unchecked — this fix is ESP32-only (I80 parallel displays and LVGL are ESP32 features).