From b36a1f0e2eca1e2bb1a342eb364b0028ff5f6650 Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Sat, 17 Oct 2026 16:25:01 -0700 Subject: [PATCH] ESP8266: shorter soft SPI fill passes to avoid soft WDT reset Each 20000-pixel pass took about 1.65 s with no yield on a 3.5" HX8357, which tripped the soft watchdog. 5000 pixels is about 0.4 s. Co-Authored-By: Claude Opus 5.5 (1M context) --- Adafruit_SPITFT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index fe09d0a..a81f938 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -1444,8 +1444,8 @@ void Adafruit_SPITFT::writeColor(uint16_t color, uint32_t len) { #if defined(ESP8266) do { uint32_t pixelsThisPass = len; - if (pixelsThisPass > 20000) - pixelsThisPass = 20000; + if (pixelsThisPass > 5000) // About 0.4 s, well under the soft WDT + pixelsThisPass = 5000; len -= pixelsThisPass; optimistic_yield(10000); // Yield if 10 ms since last yield while (pixelsThisPass--) {