From d1f96007de7ade919578fdd6bd135893fe3d392f Mon Sep 17 00:00:00 2001 From: Vitali Date: Sat, 25 Jul 2026 13:55:53 +0700 Subject: [PATCH] fix(display): erase full icon height in boot carousel The sun's lowest ray reached y+H, one row below the H-tall erase box, leaving a stray dot/trail. Erase H+4 so nothing is left behind. Co-Authored-By: Claude Opus 4.8 --- WeatherPredictor/display_ui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WeatherPredictor/display_ui.cpp b/WeatherPredictor/display_ui.cpp index 9a83585..7c14b91 100644 --- a/WeatherPredictor/display_ui.cpp +++ b/WeatherPredictor/display_ui.cpp @@ -111,12 +111,12 @@ void displayDemo() { // slide in from the right edge to centre int px = 160 + 12; for (int x = 160; x >= cxc; x -= 12) { - tft.fillRect(px, y, W, H, ST77XX_BLACK); + tft.fillRect(px, y, W, H + 4, ST77XX_BLACK); drawIcon(cats[k], x, y, W, H); px = x; delay(26); } - tft.fillRect(px, y, W, H, ST77XX_BLACK); + tft.fillRect(px, y, W, H + 4, ST77XX_BLACK); drawIcon(cats[k], cxc, y, W, H); // label centred below in the category colour int len = 0; while (names[k][len]) len++; // size 2 = 12 px/char @@ -129,12 +129,12 @@ void displayDemo() { // slide out to the left edge px = cxc; for (int x = cxc - 12; x >= -W; x -= 12) { - tft.fillRect(px, y, W, H, ST77XX_BLACK); + tft.fillRect(px, y, W, H + 4, ST77XX_BLACK); drawIcon(cats[k], x, y, W, H); px = x; delay(24); } - tft.fillRect(px, y, W, H, ST77XX_BLACK); // clear the last remnant + tft.fillRect(px, y, W, H + 4, ST77XX_BLACK); // clear the last remnant } tft.setTextColor(ST77XX_WHITE); }