Added preprocessor check to prevent adding wifimanager reset link to webupdater html interface.
This commit is contained in:
parent
53ca46e7bd
commit
1253123e46
1 changed files with 8 additions and 0 deletions
|
@ -44,7 +44,9 @@ void setupWebUpdater(String device, String ip)
|
||||||
httpUpdater.setup(&httpServer);
|
httpUpdater.setup(&httpServer);
|
||||||
|
|
||||||
httpServer.on("/", showHTMLMain);
|
httpServer.on("/", showHTMLMain);
|
||||||
|
#ifndef DISABLE_WIFIMANAGER
|
||||||
httpServer.on("/resetWifiManager", resetWifiManager);
|
httpServer.on("/resetWifiManager", resetWifiManager);
|
||||||
|
#endif
|
||||||
#ifdef HOMEBRIDGE_WEBSTAT
|
#ifdef HOMEBRIDGE_WEBSTAT
|
||||||
httpServer.on("/hbWebstat", hb_webstat_send);
|
httpServer.on("/hbWebstat", hb_webstat_send);
|
||||||
#endif
|
#endif
|
||||||
|
@ -131,7 +133,9 @@ void showHTMLMain(void)
|
||||||
TR_TD_START_STR + "wifi rssi" + TD_TD_MID_STR + WiFi.RSSI() + TR_TD_END_STR
|
TR_TD_START_STR + "wifi rssi" + TD_TD_MID_STR + WiFi.RSSI() + TR_TD_END_STR
|
||||||
TR_TD_START_STR + "wifi rec cnt" + TD_TD_MID_STR + String(_wifi_reconnect_cnt) + TR_TD_END_STR
|
TR_TD_START_STR + "wifi rec cnt" + TD_TD_MID_STR + String(_wifi_reconnect_cnt) + TR_TD_END_STR
|
||||||
"</table>"
|
"</table>"
|
||||||
|
#ifndef DISABLE_WIFIMANAGER
|
||||||
"<br><br><br><br><br><a href=\"http://" + _webUpdater_ip + ":8080/resetWifiManager\">reset WiFi Manager</a><br>"
|
"<br><br><br><br><br><a href=\"http://" + _webUpdater_ip + ":8080/resetWifiManager\">reset WiFi Manager</a><br>"
|
||||||
|
#endif
|
||||||
"</body></html>";
|
"</body></html>";
|
||||||
|
|
||||||
httpServer.send(200, "text/html", message);
|
httpServer.send(200, "text/html", message);
|
||||||
|
@ -172,6 +176,8 @@ void hb_webstat_send(void)
|
||||||
|
|
||||||
//*************************************************************************//
|
//*************************************************************************//
|
||||||
|
|
||||||
|
#ifndef DISABLE_WIFIMANAGER
|
||||||
|
|
||||||
void resetWifiManager()
|
void resetWifiManager()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -194,6 +200,8 @@ void resetWifiManager()
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//*************************************************************************//
|
//*************************************************************************//
|
||||||
|
|
||||||
#ifdef DEBUG_WINDSPEED_MEASUREMENT
|
#ifdef DEBUG_WINDSPEED_MEASUREMENT
|
||||||
|
|
Loading…
Reference in a new issue