mirror of
https://github.com/wled/WLED.git
synced 2025-07-18 16:26:32 +00:00
Compile fix
This commit is contained in:
parent
dcd3e07273
commit
a147f4120c
@ -33,7 +33,7 @@ static bool isIp(const String &str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool inSubnet(const IPAddress &ip, const IPAddress &subnet, const IPAddress &mask) {
|
static bool inSubnet(const IPAddress &ip, const IPAddress &subnet, const IPAddress &mask) {
|
||||||
return ((ip & mask) == (subnet & mask));
|
return (((uint32_t)ip & (uint32_t)mask) == ((uint32_t)subnet & (uint32_t)mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool inSameSubnet(const IPAddress &client) {
|
static bool inSameSubnet(const IPAddress &client) {
|
||||||
@ -653,6 +653,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
|
|||||||
#endif
|
#endif
|
||||||
case SUBPAGE_UM : content = PAGE_settings_um; len = PAGE_settings_um_length; break;
|
case SUBPAGE_UM : content = PAGE_settings_um; len = PAGE_settings_um_length; break;
|
||||||
case SUBPAGE_UPDATE : content = PAGE_update; len = PAGE_update_length;
|
case SUBPAGE_UPDATE : content = PAGE_update; len = PAGE_update_length;
|
||||||
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
if (request->hasArg(F("revert")) && inLocalSubnet(request->client()->remoteIP()) && Update.canRollBack()) {
|
if (request->hasArg(F("revert")) && inLocalSubnet(request->client()->remoteIP()) && Update.canRollBack()) {
|
||||||
doReboot = Update.rollBack();
|
doReboot = Update.rollBack();
|
||||||
if (doReboot) {
|
if (doReboot) {
|
||||||
@ -662,6 +663,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifndef WLED_DISABLE_2D
|
#ifndef WLED_DISABLE_2D
|
||||||
case SUBPAGE_2D : content = PAGE_settings_2D; len = PAGE_settings_2D_length; break;
|
case SUBPAGE_2D : content = PAGE_settings_2D; len = PAGE_settings_2D_length; break;
|
||||||
|
@ -663,6 +663,9 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
|||||||
VERSION);
|
VERSION);
|
||||||
|
|
||||||
printSetClassElementHTML(settingsScript,PSTR("sip"),0,tmp_buf);
|
printSetClassElementHTML(settingsScript,PSTR("sip"),0,tmp_buf);
|
||||||
|
#ifndef ARDUINO_ARCH_ESP32
|
||||||
|
settingsScript.print(F("toggle('rev');")); // hide revert button on ESP8266
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subPage == SUBPAGE_2D) // 2D matrices
|
if (subPage == SUBPAGE_2D) // 2D matrices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user