From 18ba3949012f8fd1a06d6e703232ce35bb75e0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Wed, 8 Sep 2021 07:54:40 +0200 Subject: [PATCH] Changed behaviour of effects. - Police (col1 for bg) - Two areas (changable width, col1 for bg) - Two dots (changable width) --- wled00/FX.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index e1b26f52..e158efe4 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -1241,15 +1241,16 @@ uint16_t WS2812FX::mode_police_all() //Police Lights Red and Blue uint16_t WS2812FX::mode_police() { - fill(BLACK); - return police_base(RED, BLUE, (1 + ((SEGLEN*SEGMENT.intensity)>>9))); + fill(SEGCOLOR(1)); + return police_base(RED, BLUE, (1 + ((SEGLEN*SEGMENT.intensity)>>9))); // max width is half the strip } //Police All with custom colors uint16_t WS2812FX::mode_two_areas() { - return police_base(SEGCOLOR(0), SEGCOLOR(1), (SEGLEN>>1)); + fill(SEGCOLOR(2)); + return police_base(SEGCOLOR(0), SEGCOLOR(1), (1 + ((SEGLEN*SEGMENT.intensity)>>9))); // max width is half the strip } @@ -1259,7 +1260,7 @@ uint16_t WS2812FX::mode_two_dots() fill(SEGCOLOR(2)); uint32_t color2 = (SEGCOLOR(1) == SEGCOLOR(2)) ? SEGCOLOR(0) : SEGCOLOR(1); - return police_base(SEGCOLOR(0), color2, 1); + return police_base(SEGCOLOR(0), color2, (1 + ((SEGLEN*SEGMENT.intensity)>>9))); // max width is half the strip }