Correct start of Lighthouse effect at high speeds (#643)

This commit is contained in:
Def3nder 2020-01-29 23:20:32 +01:00 committed by GitHub
parent e4d5551f16
commit a29e98fd41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1039,6 +1039,10 @@ uint16_t WS2812FX::mode_comet(void) {
for (uint16_t i = SEGENV.aux0; i < index ; i++) {
setPixelColor( i, color_from_palette(i, true, PALETTE_SOLID_WRAP, 0));
}
} else if (index < SEGENV.aux0 && index < 10) {
for (uint16_t i = 0; i < index ; i++) {
setPixelColor( i, color_from_palette(i, true, PALETTE_SOLID_WRAP, 0));
}
}
SEGENV.aux0 = index++;