From 5464cbc2ed9c5c01997d2e55e066a617592fdefe Mon Sep 17 00:00:00 2001 From: cschwinne Date: Fri, 26 Jun 2020 23:09:19 +0200 Subject: [PATCH 1/2] Fix Alexa not turning off white channel (fixes #1012) --- CHANGELOG.md | 4 ++++ wled00/alexa.cpp | 1 + wled00/wled.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cad688bd..902680bb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Development versions after 0.10.0 release +#### Build 2006250 + +- Fix Alexa not turning off white channel (fixes #1012) + #### Build 2006220 - Added Sunrise nightlight mode diff --git a/wled00/alexa.cpp b/wled00/alexa.cpp index c9f61ff23..05e460931 100644 --- a/wled00/alexa.cpp +++ b/wled00/alexa.cpp @@ -85,6 +85,7 @@ void onAlexaChange(EspalexaDevice* dev) col[0] = ((color >> 16) & 0xFF); col[1] = ((color >> 8) & 0xFF); col[2] = ( color & 0xFF); + col[3] = 0; } colorUpdated(NOTIFIER_CALL_MODE_ALEXA); } diff --git a/wled00/wled.h b/wled00/wled.h index dba45f7c5..678effca3 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2006220 +#define VERSION 2006250 // ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS). From 10a1275a52b6490a224269d273f00ab0d4a207bc Mon Sep 17 00:00:00 2001 From: cschwinne Date: Fri, 26 Jun 2020 23:30:13 +0200 Subject: [PATCH 2/2] Added SV=2 to HTTP API, allow selecting single segment only --- CHANGELOG.md | 4 ++++ wled00/set.cpp | 11 ++++++++++- wled00/wled.h | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 902680bb4..2c9e0ee4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Development versions after 0.10.0 release +#### Build 2006251 + +- Added `SV=2` to HTTP API, allow selecting single segment only + #### Build 2006250 - Fix Alexa not turning off white channel (fixes #1012) diff --git a/wled00/set.cpp b/wled00/set.cpp index 8bdf4670e..afc152ac5 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -423,7 +423,16 @@ bool handleSet(AsyncWebServerRequest *request, const String& req) WS2812FX::Segment& mainseg = strip.getSegment(main); pos = req.indexOf("SV="); //segment selected - if (pos > 0) mainseg.setOption(SEG_OPTION_SELECTED, (req.charAt(pos+3) != '0')); + if (pos > 0) { + byte t = getNumVal(&req, pos); + if (t == 2) { + for (uint8_t i = 0; i < strip.getMaxSegments(); i++) + { + strip.getSegment(i).setOption(SEG_OPTION_SELECTED, 0); + } + } + mainseg.setOption(SEG_OPTION_SELECTED, t); + } uint16_t startI = mainseg.start; uint16_t stopI = mainseg.stop; diff --git a/wled00/wled.h b/wled00/wled.h index 678effca3..5c34955d0 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2006250 +#define VERSION 2006251 // ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS).