partly disable waitUntilIdle() as its still work-in-progress

This disables parts of the new feature that might lead to delays, so basicially there is some detection, but no protection any more.

further development needed --> audio_fastpath branch

compile with -D WLEDMM_PROTECT_SERVICE to enable full protection.
This commit is contained in:
Frank
2023-06-01 21:55:46 +02:00
parent 333f5ac2a1
commit 404fb566fa
7 changed files with 19 additions and 12 deletions

View File

@@ -165,15 +165,19 @@ void WLED::loop()
unsigned long stripMillis = millis();
#endif
if (!offMode || strip.isOffRefreshRequired()) {
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE) // WLEDMM experimental
static unsigned long lastTimeService = 0; // WLEMM needed to remove stale lock
if (!suspendStripService && !doInitBusses && !loadLedmap) { // WLEDMM prevent effect drawing while strip or segments are being updated
#endif
strip.service();
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE)
lastTimeService = millis();
} else {
if (suspendStripService && (millis() - lastTimeService > 1500)) { // WLEDMM remove stale lock after 1.5 seconds
USER_PRINTLN("--> looptask: stale suspendStripService lock removed after 1500 ms."); // should not happen - check for missing "suspendStripService = false"
}
}
#endif
}
#ifdef ESP8266
else if (!noWifiSleep)