mirror of
https://github.com/wled/WLED.git
synced 2025-07-18 00:06:31 +00:00
parent
9940258725
commit
220217561a
@ -210,7 +210,14 @@ bool deserializeSegment(JsonObject elem, byte it, byte presetId)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
byte fx = seg.mode;
|
byte fx = seg.mode;
|
||||||
if (getVal(elem["fx"], &fx, 0, strip.getModeCount())) { //load effect ('r' random, '~' inc/dec, 0-255 exact value)
|
byte last = strip.getModeCount();
|
||||||
|
// partial fix for #3605
|
||||||
|
if (!elem["fx"].isNull() && elem["fx"].is<const char*>()) {
|
||||||
|
const char *tmp = elem["fx"].as<const char *>();
|
||||||
|
if (strlen(tmp) > 3 && (strchr(tmp,'r') || strchr(tmp,'~') != strrchr(tmp,'~'))) last = 0; // we have "X~Y(r|[w]~[-])" form
|
||||||
|
}
|
||||||
|
// end fix
|
||||||
|
if (getVal(elem["fx"], &fx, 0, last)) { //load effect ('r' random, '~' inc/dec, 0-255 exact value, 5~10r pick random between 5 & 10)
|
||||||
if (!presetId && currentPlaylist>=0) unloadPlaylist();
|
if (!presetId && currentPlaylist>=0) unloadPlaylist();
|
||||||
if (fx != seg.mode) seg.setMode(fx, elem[F("fxdef")]);
|
if (fx != seg.mode) seg.setMode(fx, elem[F("fxdef")]);
|
||||||
}
|
}
|
||||||
|
@ -434,6 +434,8 @@ void exitRealtime() {
|
|||||||
realtimeIP[0] = 0;
|
realtimeIP[0] = 0;
|
||||||
if (useMainSegmentOnly) { // unfreeze live segment again
|
if (useMainSegmentOnly) { // unfreeze live segment again
|
||||||
strip.getMainSegment().freeze = false;
|
strip.getMainSegment().freeze = false;
|
||||||
|
} else {
|
||||||
|
strip.show(); // possible fix for #3589
|
||||||
}
|
}
|
||||||
updateInterfaces(CALL_MODE_WS_SEND);
|
updateInterfaces(CALL_MODE_WS_SEND);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user