From 105f427f22fe82669c9abddc7ba1c90d3c244695 Mon Sep 17 00:00:00 2001 From: Christian Schuster Date: Sun, 21 Jun 2026 19:40:18 +0200 Subject: [PATCH 1/2] clear garbage white value in hsv2rgb_rainbow, overwrite white value in Segment::color_wheel --- wled00/FX_fcn.cpp | 4 ++-- wled00/src/dependencies/fastled_slim/fastled_slim.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index a30410daec..ae5e88d405 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1148,10 +1148,10 @@ void Segment::blur(uint8_t blur_amount, bool smear) const { */ uint32_t Segment::color_wheel(uint8_t pos) const { if (palette) return color_from_palette(pos, false, true, 0); // color_wheel is a continuous (moving) wheel, so wrap end->start (restores pre-0.16 behaviour) - uint8_t w = W(getCurrentColor(0)); CRGBW rgb; rgb = CHSV32(static_cast(pos << 8), 255, 255); - return rgb.color32 | (w << 24); // add white channel + rgb.w = W(getCurrentColor(0)); // add white channel + return rgb.color32; } /* diff --git a/wled00/src/dependencies/fastled_slim/fastled_slim.cpp b/wled00/src/dependencies/fastled_slim/fastled_slim.cpp index 55708bbdf5..e7cabe1d65 100644 --- a/wled00/src/dependencies/fastled_slim/fastled_slim.cpp +++ b/wled00/src/dependencies/fastled_slim/fastled_slim.cpp @@ -102,7 +102,7 @@ __attribute__((optimize("O2"))) void hsv2rgb_rainbow(uint16_t h, uint8_t s, uint rgbdata[0] = b; rgbdata[1] = g; rgbdata[2] = r; - //rgbdata[3] = 0; // white + rgbdata[3] = 0; // white } else { rgbdata[0] = r; rgbdata[1] = g; From 512a68e3e9d006461fc6317ff0b42596c7a80b40 Mon Sep 17 00:00:00 2001 From: Christian Schuster Date: Sun, 21 Jun 2026 22:19:59 +0200 Subject: [PATCH 2/2] revert change in hsv2rgb_rainbow --- wled00/src/dependencies/fastled_slim/fastled_slim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/src/dependencies/fastled_slim/fastled_slim.cpp b/wled00/src/dependencies/fastled_slim/fastled_slim.cpp index e7cabe1d65..55708bbdf5 100644 --- a/wled00/src/dependencies/fastled_slim/fastled_slim.cpp +++ b/wled00/src/dependencies/fastled_slim/fastled_slim.cpp @@ -102,7 +102,7 @@ __attribute__((optimize("O2"))) void hsv2rgb_rainbow(uint16_t h, uint8_t s, uint rgbdata[0] = b; rgbdata[1] = g; rgbdata[2] = r; - rgbdata[3] = 0; // white + //rgbdata[3] = 0; // white } else { rgbdata[0] = r; rgbdata[1] = g;