diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index 751bc5ac14..2e1b3a86ef 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -113,7 +113,7 @@ void WS2812FX::setUpMatrix() { // delete gap array as we no longer need it p_free(gapTable); - resume(); + // NOTE: do not resume() here; caller must call resume() after segments are updated #ifdef WLED_DEBUG DEBUG_PRINT(F("Matrix ledmap:")); @@ -130,6 +130,7 @@ void WS2812FX::setUpMatrix() { Segment::maxWidth = _length; Segment::maxHeight = 1; resetSegments(); + resume(); // resume here since resetSegments() was called } } #else diff --git a/wled00/set.cpp b/wled00/set.cpp index 893081b986..12fd8f2207 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -817,6 +817,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) strip.panel.shrink_to_fit(); // release unused memory strip.deserializeMap(); // (re)load default ledmap (will also setUpMatrix() if ledmap does not exist) strip.makeAutoSegments(true); // force re-creation of segments + strip.resume(); // resume strip service after 2D config changes are complete } #endif diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 923688106d..f60f32b9f2 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -193,6 +193,7 @@ void WLED::loop() strip.finalizeInit(); // will create buses and also load default ledmap if present if (aligned) strip.makeAutoSegments(); else strip.fixInvalidSegments(); + strip.resume(); // resume strip service after bus re-initialization BusManager::setBrightness(scaledBri(bri)); // fix re-initialised bus' brightness #4005 and #4824 configNeedsWrite = true; } @@ -563,6 +564,7 @@ void WLED::beginStrip() strip.setTransition(0); // temporarily prevent transitions to reduce segment copies strip.finalizeInit(); // busses created during deserializeConfig() if config existed strip.makeAutoSegments(); + strip.resume(); // resume strip service after initialization strip.setBrightness(0); strip.setShowCallback(handleOverlayDraw); doInitBusses = false;