Possible fix for #3541

This commit is contained in:
Blaz Kristan
2023-11-27 13:27:52 +01:00
parent 0227f79bd7
commit 426ac29ca5
10 changed files with 36 additions and 41 deletions

View File

@@ -297,7 +297,7 @@ class Animated_Staircase : public Usermod {
offIndex = maxSegmentId = strip.getLastActiveSegmentId() + 1;
// shorten the strip transition time to be equal or shorter than segment delay
transitionDelayTemp = transitionDelay = segment_delay_ms;
transitionDelay = segment_delay_ms;
strip.setTransition(segment_delay_ms/100);
strip.trigger();
} else {

View File

@@ -91,7 +91,7 @@ class StairwayWipeUsermod : public Usermod {
void startWipe()
{
bri = briLast; //turn on
transitionDelayTemp = 0; //no transition
strip.setTransition(0); //no transition
effectCurrent = FX_MODE_COLOR_WIPE;
resetTimebase(); //make sure wipe starts from beginning
@@ -106,9 +106,9 @@ class StairwayWipeUsermod : public Usermod {
void turnOff()
{
#ifdef STAIRCASE_WIPE_OFF
transitionDelayTemp = 0; //turn off immediately after wipe completed
strip.setTransition(0); //turn off immediately after wipe completed
#else
transitionDelayTemp = 4000; //fade out slowly
strip.setTransition(4000); //fade out slowly
#endif
bri = 0;
stateUpdated(CALL_MODE_NOTIFICATION);