Fixed preset loading

pull/133/head
cschwinne 2019-02-25 19:14:13 +01:00
rodzic 600181ed07
commit 587cf751d8
6 zmienionych plików z 11 dodań i 9 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -53,9 +53,9 @@ http:// <input name="CM" maxlength="32"> .local<br>
Try connecting before opening AP for: <input name="AT" type="number" min="0" max="255" required> s <br>
Client IP: <span class="sip"> Not connected </span><br>
<h3>Configure Access Point</h3>
AP SSID (leave empty for no AP):<br> <input name="AS" maxlength="32"><br>
AP SSID (leave empty for no AP):<br><input name="AS" maxlength="32"><br>
Hide AP name: <input type="checkbox" name="AH"><br>
AP password (leave empty for open):<br> <input type="password" name="AP" maxlength="63"> <br>
AP password (leave empty for open):<br> <input type="password" name="AP" maxlength="63"><br>
Access Point WiFi channel: <input name="AC" type="number" min="1" max="13" required><br>
AP IP: <span class="sip"> Not active </span><hr>
<button type="button" onclick="B()">Back</button><button type="submit">Save & Reboot</button>
@ -215,7 +215,7 @@ On/Off button enabled: <input type="checkbox" name="BT"><br>
Infrared receiver enabled: <input type="checkbox" name="IR"><br>
<a href="https://github.com/Aircoookie/WLED/wiki/Infrared-Control" target="_blank">IR info</a>
<h3>WLED Broadcast</h3>
UDP Port: <input name="UP" maxlength="5" size="4"><br>
UDP Port: <input name="UP" type="number" min="1" max="65535" required><br>
Receive <input type="checkbox" name="RB">Brightness, <input type="checkbox" name="RC">Color, and <input type="checkbox" name="RX">Effects<br>
Send notifications on direct change: <input type="checkbox" name="SD"><br>
Send notifications on button press: <input type="checkbox" name="SB"><br>

Wyświetl plik

@ -37,7 +37,6 @@
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#endif
#include <ESPAsyncWebServer.h>
@ -373,10 +372,12 @@ long lastInterfaceUpdate = 0;
byte interfaceUpdateCallMode = 0;
uint32_t mqttFailedConAttempts = 0;
#if AUXPIN >= 0
//auxiliary debug pin
byte auxTime = 0;
unsigned long auxStartTime = 0;
bool auxActive = false, auxActiveBefore = false;
#endif
//alexa udp
String escapedMac;

Wyświetl plik

@ -561,7 +561,8 @@ bool handleSet(AsyncWebServerRequest *request, String req)
nightlightFade = (req.charAt(pos+3) != '0');
nightlightActiveOld = false; //re-init
}
#if AUXPIN >= 0
//toggle general purpose output
pos = req.indexOf("AX=");
if (pos > 0) {
@ -569,6 +570,7 @@ bool handleSet(AsyncWebServerRequest *request, String req)
auxActive = true;
if (auxTime == 0) auxActive = false;
}
#endif
pos = req.indexOf("TT=");
if (pos > 0) transitionDelay = getNumVal(&req, pos);
@ -635,7 +637,7 @@ bool handleSet(AsyncWebServerRequest *request, String req)
//apply preset
if (updateVal(&req, "PL=", &presetCycCurr, presetCycleMin, presetCycleMax)) {
applyPreset(getNumVal(&req, pos), presetApplyBri, presetApplyCol, presetApplyFx);
applyPreset(presetCycCurr, presetApplyBri, presetApplyCol, presetApplyFx);
}
//cronixie

Wyświetl plik

@ -286,7 +286,7 @@ void getJsonInfo()
#else
oappend("\"no-ota\"]");
#endif
oappend(",\r\n\"brand\":\"wled\",\r\n\"btype\":\"dev\",\r\n\"mac\":\"");
oappend(",\r\n\"brand\":\"wled\",\r\n\"product\":\"DIY light\",\r\n\"btype\":\"dev\",\r\n\"mac\":\"");
oappend((char*)escapedMac.c_str());
oappend("\"\r\n}");
}

Wyświetl plik

@ -30,11 +30,10 @@ void setAllLeds() {
}
if (!enableSecTransition)
{
for (byte i = 0; i<3; i++)
for (byte i = 0; i<4; i++)
{
colSecT[i] = colSec[i];
}
colSecT[3] = colSec[3];
}
if (useRGBW && autoRGBtoRGBW)
{