Fix staircase mode segment 1 animation (#2469)
This commit is contained in:
parent
33f72e40da
commit
9f44f989e5
@ -111,17 +111,17 @@ class Animated_Staircase : public Usermod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i >= onIndex && i < offIndex) {
|
if (i >= onIndex && i < offIndex) {
|
||||||
segments->setOption(SEG_OPTION_ON, 1, 1);
|
segments->setOption(SEG_OPTION_ON, 1, i);
|
||||||
|
|
||||||
// We may need to copy mode and colors from segment 0 to make sure
|
// We may need to copy mode and colors from segment 0 to make sure
|
||||||
// changes are propagated even when the config is changed during a wipe
|
// changes are propagated even when the config is changed during a wipe
|
||||||
// segments->mode = mainsegment.mode;
|
// segments->mode = mainsegment.mode;
|
||||||
// segments->colors[0] = mainsegment.colors[0];
|
// segments->colors[0] = mainsegment.colors[0];
|
||||||
} else {
|
} else {
|
||||||
segments->setOption(SEG_OPTION_ON, 0, 1);
|
segments->setOption(SEG_OPTION_ON, 0, i);
|
||||||
}
|
}
|
||||||
// Always mark segments as "transitional", we are animating the staircase
|
// Always mark segments as "transitional", we are animating the staircase
|
||||||
segments->setOption(SEG_OPTION_TRANSITIONAL, 1, 1);
|
segments->setOption(SEG_OPTION_TRANSITIONAL, 1, i);
|
||||||
}
|
}
|
||||||
colorUpdated(CALL_MODE_DIRECT_CHANGE);
|
colorUpdated(CALL_MODE_DIRECT_CHANGE);
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ class Animated_Staircase : public Usermod {
|
|||||||
maxSegmentId = i - 1;
|
maxSegmentId = i - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
segments->setOption(SEG_OPTION_ON, 1, 1);
|
segments->setOption(SEG_OPTION_ON, 1, i);
|
||||||
}
|
}
|
||||||
colorUpdated(CALL_MODE_DIRECT_CHANGE);
|
colorUpdated(CALL_MODE_DIRECT_CHANGE);
|
||||||
DEBUG_PRINTLN(F("Animated Staircase disabled."));
|
DEBUG_PRINTLN(F("Animated Staircase disabled."));
|
||||||
|
Loading…
Reference in New Issue
Block a user