From d23f33178ea681867cd1e1f55401276a21fbe3fb Mon Sep 17 00:00:00 2001 From: Matt Edholm Date: Sun, 17 May 2026 13:34:39 -0400 Subject: [PATCH] fix(13e6): clear-to-white before setup screens to defeat ghost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A single DRF refresh isn't enough to discharge Spectra-6's color particles when transitioning from a full-color photo to a mostly-yellow/red/green setup screen — residual pixels from the previous photo stay visible. Pre-fill with white (full refresh) before drawing the actual screen so the panel is fully reset. Doubles the refresh time on setup events only; photo cycles are unaffected. Bumps PANEL_FW_VERSION to v1.0.3. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/panels/waveshare13e6/v1/epd_driver.cpp | 9 +++++++++ src/panels/waveshare13e6/v1/version.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/panels/waveshare13e6/v1/epd_driver.cpp b/src/panels/waveshare13e6/v1/epd_driver.cpp index 0f2ef91..7493c00 100644 --- a/src/panels/waveshare13e6/v1/epd_driver.cpp +++ b/src/panels/waveshare13e6/v1/epd_driver.cpp @@ -450,14 +450,23 @@ static void draw_from_lfs(const char* path, uint8_t fallback_color, // QR placeholders move to (W - old_x - QR_PX, H - old_y - QR_PX). // AP (518 px QR): pre-rot 642,590 → post-rot 40,492 // Setup (574 px QR): pre-rot 313,750 → post-rot 313,276 (X centred) +// Setup screens (yellow AP / red retry / green setup) are mostly two-tone +// against a small palette. Transitioning from a full-color photo to one of +// these in a single DRF cycle leaves visible ghost of the previous image — +// Spectra-6's color particles need more discharge time than one refresh +// provides. Pre-clear to white first so the panel is fully reset, then draw +// the actual screen. Doubles the refresh time on setup events only. void epd_draw_ap_screen(QRCode* qr) { + epd_fill(COLOR_WHITE); draw_from_lfs("/ap_bg.bin", COLOR_YELLOW, qr, 40, 492, 14); } void epd_draw_ap_screen_retry(QRCode* qr) { + epd_fill(COLOR_WHITE); draw_from_lfs("/ap_bg_retry.bin", COLOR_RED, qr, 40, 492, 14); } void epd_draw_setup_screen(QRCode* qr) { + epd_fill(COLOR_WHITE); draw_from_lfs("/setup_bg.bin", COLOR_GREEN, qr, 313, 276, 14); } diff --git a/src/panels/waveshare13e6/v1/version.h b/src/panels/waveshare13e6/v1/version.h index 30507e8..e47e767 100644 --- a/src/panels/waveshare13e6/v1/version.h +++ b/src/panels/waveshare13e6/v1/version.h @@ -3,4 +3,4 @@ // Panel-specific firmware version for the Waveshare 13.3" Spectra-6 driver. // Bump on each driver change worth correlating with server-side reports. // Independent of the shared firmware version (HTTP / NVS / sleep / etc.). -#define PANEL_FW_VERSION "v1.0.2" +#define PANEL_FW_VERSION "v1.0.3"