Fix resetsegments on 2D change: only change width and height

This commit is contained in:
Ewoud
2023-02-07 13:27:30 +01:00
parent 38cd794563
commit 26f97f4dc6
4 changed files with 1026 additions and 1020 deletions

View File

@@ -129,7 +129,13 @@ void WS2812FX::setUpMatrix(bool reset) {
Segment::maxWidth = _length;
Segment::maxHeight = 1;
}
if (reset) resetSegments(); //WLEDMM: only if reset
if (reset) //resetSegments(); //WLEDMM: only if reset, and only update width and height, keep the fx in place
for (segment &seg : _segments) {
seg.start = 0;
seg.stop = Segment::maxWidth;
seg.startY = 0;
seg.stopY = Segment::maxHeight;
}
}
#else
isMatrix = false; // no matter what config says