bugfix: rest segments when leds are switched off/on
based on an idea from @blazoncek in 4cc2cc4ad4 (diff-749825f808f7ce1ce1108fffc7ed037085160a63cad32397135dfc0063494373R56)
This commit is contained in:
@@ -430,7 +430,7 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
|
||||
}
|
||||
}
|
||||
|
||||
int tr = -1;
|
||||
long tr = -1;
|
||||
if (!presetId || currentPlaylist < 0) { //do not apply transition time from preset if playlist active, as it would override playlist transition times
|
||||
tr = root[F("transition")] | -1;
|
||||
if (tr >= 0)
|
||||
@@ -463,7 +463,7 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
|
||||
strip.setTransition(transitionDelayTemp); // required here for color transitions to have correct duration
|
||||
|
||||
tr = root[F("tb")] | -1;
|
||||
if (tr >= 0) strip.timebase = ((uint32_t)tr) - millis();
|
||||
if (tr >= 0) strip.timebase = ((unsigned long)tr) - millis();
|
||||
|
||||
JsonObject nl = root["nl"];
|
||||
nightlightActive = nl["on"] | nightlightActive;
|
||||
|
||||
Reference in New Issue
Block a user