From 86d14fe24c212d4bbcb35bfa895a8b29155d8901 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Wed, 29 May 2019 19:24:47 +0200 Subject: [PATCH 1/2] Fix #5869 --- sonoff/_changelog.ino | 1 + sonoff/xdrv_04_light.ino | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 874fa5e34..5a5195a48 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,5 +1,6 @@ /* 6.5.0.13 20190527 * Add command SetOption38 6..255 to set IRReceive protocol detection sensitivity mimizing UNKNOWN protocols (#5853) + * Fix missing white channel for SW2812 (#5869) * * 6.5.0.12 20190521 * Add AriLux RF control GPIO option "ALux IrSel" (159) replacing "Led4i" (59) for full LED control (#5709) diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index 17a0806bb..b737fcc1d 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -1326,6 +1326,12 @@ void LightInit(void) light_device = devices_present; light_subtype = (light_type & 7) > LST_MAX ? LST_MAX : (light_type & 7); // Always 0 - LST_MAX (5) +#if defined(USE_WS2812) && (USE_WS2812_CTYPE > NEO_3LED) + if (LT_WS2812 == light_type) { + light_subtype++; // from RGB to RGBW + } +#endif + light_controller.setSubType(light_subtype); light_controller.loadSettings(); @@ -1362,9 +1368,6 @@ void LightInit(void) } #ifdef USE_WS2812 // ************************************************************************ else if (LT_WS2812 == light_type) { -#if (USE_WS2812_CTYPE > NEO_3LED) - light_subtype++; // from RGB to RGBW -#endif Ws2812Init(); max_scheme = LS_MAX + WS2812_SCHEMES; } From 74685f12024b31510dfc71bed9284e6afef20e33 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Wed, 29 May 2019 19:26:42 +0200 Subject: [PATCH 2/2] Fix #5869 typo --- sonoff/_changelog.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 5a5195a48..7327cb8b6 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,6 +1,6 @@ /* 6.5.0.13 20190527 * Add command SetOption38 6..255 to set IRReceive protocol detection sensitivity mimizing UNKNOWN protocols (#5853) - * Fix missing white channel for SW2812 (#5869) + * Fix missing white channel for WS2812 (#5869) * * 6.5.0.12 20190521 * Add AriLux RF control GPIO option "ALux IrSel" (159) replacing "Led4i" (59) for full LED control (#5709)