Merge pull request #5023 from DedeHai/matrix_save_fix

fix timing issue when changing 1D <-> 2D credits to @blazoncek
This commit is contained in:
Will Tatam
2025-11-09 08:13:22 +00:00
committed by GitHub
3 changed files with 22 additions and 11 deletions

View File

@@ -814,8 +814,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