Skip to content

Commit

Permalink
Fix staircase mode segment 1 animation (wled#2469)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMarkovic authored Jan 5, 2022
1 parent 33f72e4 commit 9f44f98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions usermods/Animated_Staircase/Animated_Staircase.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,17 @@ class Animated_Staircase : public Usermod {
}

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
// changes are propagated even when the config is changed during a wipe
// segments->mode = mainsegment.mode;
// segments->colors[0] = mainsegment.colors[0];
} 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
segments->setOption(SEG_OPTION_TRANSITIONAL, 1, 1);
segments->setOption(SEG_OPTION_TRANSITIONAL, 1, i);
}
colorUpdated(CALL_MODE_DIRECT_CHANGE);
}
Expand Down Expand Up @@ -296,7 +296,7 @@ class Animated_Staircase : public Usermod {
maxSegmentId = i - 1;
break;
}
segments->setOption(SEG_OPTION_ON, 1, 1);
segments->setOption(SEG_OPTION_ON, 1, i);
}
colorUpdated(CALL_MODE_DIRECT_CHANGE);
DEBUG_PRINTLN(F("Animated Staircase disabled."));
Expand Down

0 comments on commit 9f44f98

Please sign in to comment.