diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 68600bbb5..0651dc289 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -46,7 +46,7 @@ if (this.readyState == 4) { if (this.status == 200) { if (this.responseXML != null) { - d.Cf.SA.value = this.responseXML.getElementsByTagName('act')[0].childNodes[0].nodeValue; + d.Cf.SA.value = this.responseXML.getElementsByTagName('ac')[0].childNodes[0].nodeValue; d.Cf.SR.value = this.responseXML.getElementsByTagName('cl')[0].childNodes[0].nodeValue; d.Cf.SG.value = this.responseXML.getElementsByTagName('cl')[1].childNodes[0].nodeValue; d.Cf.SB.value = this.responseXML.getElementsByTagName('cl')[2].childNodes[0].nodeValue; @@ -69,7 +69,7 @@ nState = 0; nState = (this.responseXML.getElementsByTagName('nr')[0].innerHTML)!=0?1:0; nState += (this.responseXML.getElementsByTagName('ns')[0].innerHTML)!=0?2:0; - d.getElementsByClassName("desc")[0].innerHTML = this.responseXML.getElementsByTagName('desc')[0].innerHTML; + d.getElementsByClassName("desc")[0].innerHTML = this.responseXML.getElementsByTagName('ds')[0].innerHTML; UV(); } } diff --git a/wled00/wled00.ino b/wled00/wled00.ino index 10ea871d2..04454de96 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -33,7 +33,7 @@ #include "WS2812FX.h" //version in format yymmddb (b = daily build) -#define VERSION 1803146 +#define VERSION 1803151 const String versionString = "0.6.0"; //AP and OTA default passwords (change them!) @@ -141,6 +141,7 @@ byte colSecIT[]{0, 0, 0}; byte white, whiteOld, whiteT, whiteIT; byte whiteSec, whiteSecIT; byte lastRandomIndex = 0; +uint16_t transitionDelayTemp = transitionDelay; unsigned long transitionStartTime; unsigned long nightlightStartTime; float tperLast = 0; diff --git a/wled00/wled03_set.ino b/wled00/wled03_set.ino index 5f84cebb7..94259042f 100644 --- a/wled00/wled03_set.ino +++ b/wled00/wled03_set.ino @@ -2,21 +2,15 @@ * Receives client input */ -void _setRandomColor(bool _sec) +void _setRandomColor(bool _sec,bool fromButton=false) { lastRandomIndex = strip.get_random_wheel_index(lastRandomIndex); - uint32_t _color = strip.color_wheel(lastRandomIndex); if (_sec){ - whiteSec = ((_color >> 24) & 0xFF); - colSec[0] = ((_color >> 16) & 0xFF); - colSec[1] = ((_color >> 8) & 0xFF); - colSec[2] = (_color & 0xFF); + colorHStoRGB(lastRandomIndex*256,255,colSec); } else { - white = ((_color >> 24) & 0xFF); - col[0] = ((_color >> 16) & 0xFF); - col[1] = ((_color >> 8) & 0xFF); - col[2] = (_color & 0xFF); + colorHStoRGB(lastRandomIndex*256,255,col); } + if (fromButton) colorUpdated(2); } void handleSettingsSet(byte subPage) diff --git a/wled00/wled07_notify.ino b/wled00/wled07_notify.ino index 0a96ae220..f0654f0f7 100644 --- a/wled00/wled07_notify.ino +++ b/wled00/wled07_notify.ino @@ -95,6 +95,10 @@ void handleNotifications() effectIntensity = udpIn[16]; strip.setIntensity(effectIntensity); } + if (udpIn[11] > 3) + { + transitionDelayTemp = ((udpIn[17] << 0) & 0xFF) + ((udpIn[18] << 8) & 0xFF00); + } nightlightActive = udpIn[6]; if (!nightlightActive) { diff --git a/wled00/wled08_led.ino b/wled00/wled08_led.ino index 73ee54d9b..f3ce7e7e0 100644 --- a/wled00/wled08_led.ino +++ b/wled00/wled08_led.ino @@ -76,6 +76,9 @@ void colorUpdated(int callMode) notify(callMode); if (fadeTransition || sweepTransition) { + //set correct delay if not using notification delay + if (callMode != 3) transitionDelayTemp = transitionDelay; + if (transitionActive) { colOld[0] = colT[0]; @@ -97,9 +100,9 @@ void colorUpdated(int callMode) void handleTransitions() { - if (transitionActive && transitionDelay > 0) + if (transitionActive && transitionDelayTemp > 0) { - float tper = (millis() - transitionStartTime)/(float)transitionDelay; + float tper = (millis() - transitionStartTime)/(float)transitionDelayTemp; if (tper >= 1.0) { transitionActive = false; diff --git a/wled00/wled09_button.ino b/wled00/wled09_button.ino index 12da39517..e28653b7a 100644 --- a/wled00/wled09_button.ino +++ b/wled00/wled09_button.ino @@ -20,7 +20,7 @@ void handleButton() else if (millis() - buttonPressedTime > 700) { if (macroLongPress != 0) {applyMacro(macroLongPress);} - else _setRandomColor(false); + else _setRandomColor(false,true); } else { if (macroButton == 0)