fix timing issue when changing 1D <-> 2D credits to @blazoncek

This commit is contained in:
Damian Schneider
2025-10-24 19:30:28 +02:00
parent b60313e1f8
commit 50c0f41508
3 changed files with 22 additions and 11 deletions

View File

@@ -815,8 +815,13 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
}
}
strip.panel.shrink_to_fit(); // release unused memory
// we are changing matrix/ledmap geometry which *will* affect existing segments
// since we are not in loop() context we must make sure that effects are not running. credit @blazonchek for properly fixing #4911
strip.suspend();
strip.waitForIt();
strip.deserializeMap(); // (re)load default ledmap (will also setUpMatrix() if ledmap does not exist)
strip.makeAutoSegments(true); // force re-creation of segments
strip.resume();
}
#endif