trying to reduce flickering

The NeoPixelBus RMT driver seems to get stalled when ESP.get.... functions are called (big kernel lock?). Also its glitching during flash file access.

This change tries to avoid some conflicts by first checking that the driver is not sending.
This commit is contained in:
Frank
2024-04-26 21:21:32 +02:00
parent aa544ac4c5
commit 858610e39b
5 changed files with 26 additions and 4 deletions

View File

@@ -1032,6 +1032,14 @@ void serializeInfo(JsonObject root)
if(ESP.getChipCores() > 1) // WLEDMM
root[F("resetReason1")] = (int)rtc_get_reset_reason(1);
#endif
#if defined(ARDUINO_ARCH_ESP32)
unsigned long t_wait = millis();
while(strip.isUpdating() && (millis() - t_wait < 125)) delay(1); // WLEDMM try to catch a moment when strip is idle
while(strip.isUpdating() && (millis() - t_wait < 160)) yield(); // try harder
//if (strip.isUpdating()) USER_PRINTLN("serializeInfo: strip still updating.");
#endif
root[F("lwip")] = 0; //deprecated
root[F("totalheap")] = ESP.getHeapSize(); //WLEDMM
#else