Skip to content

Commit

Permalink
Correction for "Percent with speed" (Aircoookie#642)
Browse files Browse the repository at this point in the history
The speed slider defines the "size" of pixels that will be added or substracted each refresh. If this size is bigger than the last value and you quickly move the intensity slider to zero, then the effect shows 100% all the time until it will be changed.
  • Loading branch information
Def3nder authored Jan 29, 2020
1 parent ac927d1 commit e4d5551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3027,7 +3027,7 @@ uint16_t WS2812FX::mode_percent(void) {
SEGENV.step += size;
if (SEGENV.step > active_leds) SEGENV.step = active_leds;
} else if (active_leds < SEGENV.step) {
SEGENV.step -= size;
if (SEGENV.step > size) SEGENV.step -= size; else SEGENV.step = 0;
if (SEGENV.step < active_leds) SEGENV.step = active_leds;
}

Expand Down

0 comments on commit e4d5551

Please sign in to comment.