From bc7a96d7d42382236dfaa14468b210247196669d Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Tue, 18 Nov 2025 23:13:47 +0100 Subject: [PATCH] strip wait function: increase idle wait time to 120ms Updated strip wait function to use longer idle wait time (similar to the timeout used by upstream WLED 0.16) --- wled00/FX_fcn.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 991ed761..46b37eef 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -56,13 +56,13 @@ static portMUX_TYPE s_wled_strip_mux = portMUX_INITIALIZER_UNLOCKED; // to prote #error "Max segments must be at least max number of busses!" #endif -// WLEDMM experimental . this is a "C style" wrapper for strip.waitUntilIdle() +// WLEDMM experimental . this is a "C style" wrapper for strip.() // This workaround is just needed for the segment class, that does't know about "strip" void strip_wait_until_idle(String whoCalledMe) { #if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE) // WLEDMM experimental if (strip.isServicing() && (strncmp(pcTaskGetTaskName(NULL), "loopTask", 8) != 0)) { // if we are in looptask (arduino loop), its safe to proceed without waiting USER_PRINTLN(whoCalledMe + String(": strip is still drawing effects.")); - strip.waitUntilIdle(); + strip.(); } #endif } @@ -1893,7 +1893,8 @@ void WS2812FX::finalizeInit(void) // WLEDMM wait until strip is idle (=not servicing). // on 8266 this function does nothing, because we can only do "busy waiting" on ESP32 -#define MAX_IDLE_WAIT_MS 50 // seems to work in most cases +//#define MAX_IDLE_WAIT_MS 50 // seems to work in most cases +#define MAX_IDLE_WAIT_MS 120 // better safe than sorry - similar to the timeout used by upstream WLED void WS2812FX::waitUntilIdle(void) { #if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE) if (isServicing()) {