From a29e98fd41342ba2d6f32cdd3c4dc9f5f56f12d1 Mon Sep 17 00:00:00 2001 From: Def3nder <33399267+Def3nder@users.noreply.github.com> Date: Wed, 29 Jan 2020 23:20:32 +0100 Subject: [PATCH] Correct start of Lighthouse effect at high speeds (#643) --- wled00/FX.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 796a5297..bc488b98 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -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++;