From 1253123e469d1bbeb9e236f76c8051a1adf8330c Mon Sep 17 00:00:00 2001 From: Kai Lauterbach Date: Tue, 15 Nov 2022 09:46:50 +0100 Subject: [PATCH] Added preprocessor check to prevent adding wifimanager reset link to webupdater html interface. --- firmware/webUpdater.ino | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/firmware/webUpdater.ino b/firmware/webUpdater.ino index 9e9cca7..906d2d6 100644 --- a/firmware/webUpdater.ino +++ b/firmware/webUpdater.ino @@ -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 "" +#ifndef DISABLE_WIFIMANAGER "




reset WiFi Manager
" +#endif ""; 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