Fixed preset loading
This commit is contained in:
parent
600181ed07
commit
587cf751d8
Binary file not shown.
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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}");
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user