Skip to content

Commit

Permalink
Merge pull request #5878 from s-hadinger/fix/ws2812_rgbw
Browse files Browse the repository at this point in the history
Fix #5869, missing white channnel for WS2812
  • Loading branch information
arendst committed May 29, 2019
2 parents 09d709a + 74685f1 commit 6d7d836
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions 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 WS2812 (#5869)
*
* 6.5.0.12 20190521
* Add AriLux RF control GPIO option "ALux IrSel" (159) replacing "Led4i" (59) for full LED control (#5709)
Expand Down
9 changes: 6 additions & 3 deletions sonoff/xdrv_04_light.ino
Expand Up @@ -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();

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d7d836

Please sign in to comment.