Reduce heap fragmentation when switching ledmaps

This commit is contained in:
Blaz Kristan
2023-12-28 23:32:47 +01:00
parent 6332ee6edb
commit 6cd0da821a
5 changed files with 36 additions and 53 deletions

View File

@@ -178,7 +178,7 @@ void WLED::loop()
doSerializeConfig = true;
}
if (loadLedmap >= 0) {
if (!strip.deserializeMap(loadLedmap) && strip.isMatrix && loadLedmap == 0) strip.setUpMatrix();
strip.deserializeMap(loadLedmap);
loadLedmap = -1;
}
yield();