Correction for "Percent with speed" (#642)

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.
pull/660/head
Def3nder 2020-01-29 23:10:02 +01:00 zatwierdzone przez GitHub
rodzic ac927d188b
commit e4d5551f16
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;
}