Elekstube IPS Clock digit glitches

Big thanks to you Aircoookie and all the supporting cast for WLED - really great work.

Built/loaded latest (as of Jan 2022) WLED ESP32 firmware for an Elekstube IPS clock (using the Elekstube IPS usermod) and it works pretty well. I noted it suffers from the same fault that lots of firmware in the wild suffers from, that is, glitching of the LSB seconds TFT panel and/or eventual loss of that digit entirely. I reckon this is likely to happen to any of the digits on a digit change, but happens on the LSB seconds digit because it is updated so frequently. Looks like a failure to complete the image write to the TFT panel, so as a test, turned ESP32 interrupts off during TFT panel writes in the usermod and this seems to have solved the problem. Nice!

diff --git a/usermods/EleksTube_IPS/TFTs.h b/usermods/EleksTube_IPS/TFTs.h
index 675129d..d73b733 100644
--- a/usermods/EleksTube_IPS/TFTs.h
+++ b/usermods/EleksTube_IPS/TFTs.h
@@ -183,6 +183,7 @@ public:
   void showDigit(uint8_t digit) {
     chip_select.setDigit(digit);
 
+    noInterrupts();
     if (digits[digit] == blanked) {
       fillScreen(TFT_BLACK);
     }
@@ -197,6 +198,7 @@ public:
         drawBin(file_name);
       }
     }
+    interrupts();
   }
 
   void setDigit(uint8_t digit, uint8_t value, show_t show=yes) {

I’ll may have a closer look at the likely root cause (timing, interrupt protect in root TFT code, or some such) when I get a bit of free time.

Anyway, hope this helps someone.