Fix resetsegments on 2D change: only change width and height
This commit is contained in:
@@ -378,7 +378,7 @@ typedef struct Segment {
|
||||
CRGB* leds; // local leds[] array (may be a pointer to global)
|
||||
static CRGB *_globalLeds; // global leds[] array
|
||||
static uint16_t maxWidth, maxHeight; // these define matrix width & height (max. segment dimensions)
|
||||
void *jMap; //WLEDMM jMap
|
||||
void *jMap = nullptr; //WLEDMM jMap
|
||||
|
||||
private:
|
||||
union {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -689,7 +689,7 @@ ${i.psram?inforow("Free PSRAM",(i.psram/1024).toFixed(1)," kB"):""}
|
||||
${i.psusedram?((i.tpram-i.psusedram)>16383?inforow("Max Used PSRAM ☾",((i.tpram-i.psusedram)/1024).toFixed(1)," kB"):inforow("Max Used PSRAM",(i.tpram-i.psusedram)," B")):""}
|
||||
<tr><td colspan=2><hr style="height:1px;border-width:0;color:SeaGreen;background-color:SeaGreen"></td></tr>
|
||||
${i.e32model?inforow(i.e32model + " ☾",i.e32cores +" core(s)"," "+i.e32speed+" Mhz"):""}
|
||||
${i.e32flash?inforow("Flash "+i.e32flash+" MB"+", mode "+i.e32flashmode+i.e32flashtext + " ☾",i.e32flashspeed," Mhz"):""}
|
||||
${i.e32flash?inforow("Flash "+i.e32flash+"MB"+" mode "+i.e32flashmode+i.e32flashtext + " ☾",i.e32flashspeed," Mhz"):""}
|
||||
${i.e32core0code?inforow("Core0 rst reason ☾",i.e32core0code, " "+i.e32core0text):""}
|
||||
${i.e32core1code?inforow("Core1 rst reason ☾",i.e32core1code, " "+i.e32core1text):""}
|
||||
<!-- WLEDMM end-->
|
||||
|
||||
2034
wled00/html_ui.h
2034
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user