Added preprocessor check to prevent adding wifimanager reset link to webupdater html interface.

This commit is contained in:
Kai Lauterbach 2022-11-15 09:46:50 +01:00
parent 53ca46e7bd
commit 1253123e46

View file

@ -44,7 +44,9 @@ void setupWebUpdater(String device, String ip)
httpUpdater.setup(&httpServer);
httpServer.on("/", showHTMLMain);
#ifndef DISABLE_WIFIMANAGER
httpServer.on("/resetWifiManager", resetWifiManager);
#endif
#ifdef HOMEBRIDGE_WEBSTAT
httpServer.on("/hbWebstat", hb_webstat_send);
#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 rec cnt" + TD_TD_MID_STR + String(_wifi_reconnect_cnt) + TR_TD_END_STR
"</table>"
#ifndef DISABLE_WIFIMANAGER
"<br><br><br><br><br><a href=\"http://" + _webUpdater_ip + ":8080/resetWifiManager\">reset WiFi Manager</a><br>"
#endif
"</body></html>";
httpServer.send(200, "text/html", message);
@ -172,6 +176,8 @@ void hb_webstat_send(void)
//*************************************************************************//
#ifndef DISABLE_WIFIMANAGER
void resetWifiManager()
{
@ -194,6 +200,8 @@ void resetWifiManager()
ESP.restart();
}
#endif
//*************************************************************************//
#ifdef DEBUG_WINDSPEED_MEASUREMENT