From e4d5551f168f09e59f14535a9507a2614ac3bf02 Mon Sep 17 00:00:00 2001 From: Def3nder <33399267+Def3nder@users.noreply.github.com> Date: Wed, 29 Jan 2020 23:10:02 +0100 Subject: [PATCH 1/2] 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. --- wled00/FX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 96880f4d8..796a52976 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -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; } 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 2/2] 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 796a52976..bc488b987 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++;