diff --git a/src/Settings.h b/src/Settings.h index 6cdb328..d1275b3 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -28,7 +28,7 @@ class Settings char httpUser[40]; // http basic auth username char httpPass[40]; // http basic auth password bool haDiscovery; // HomeAssistant Discovery switch - bool debugmode; // Debug-Mode + // bool debugmode; // Debug-Mode } data; void load() @@ -114,10 +114,10 @@ class Settings { data.haDiscovery = false; } - if (data.debugmode && !data.debugmode) - { - data.debugmode = false; - } + // if (data.debugmode && !data.debugmode) + //{ + // data.debugmode = false; + //} } void coVersCheck() { @@ -137,7 +137,7 @@ class Settings strcpy(data.httpUser, ""); strcpy(data.httpPass, ""); data.haDiscovery = false; - data.debugmode = false; + // data.debugmode = false; save(); load(); } diff --git a/src/htmlProzessor.h b/src/htmlProzessor.h index c726ace..3cdc3ff 100644 --- a/src/htmlProzessor.h +++ b/src/htmlProzessor.h @@ -42,7 +42,7 @@ String htmlProcessor(const String &var) return (_settings.data.httpPass); if (var == F("pre_hadiscovery")) return (_settings.data.haDiscovery ? "checked" : ""); - if (var == F("pre_debugmode")) - return (_settings.data.debugmode ? "checked" : ""); + //if (var == F("pre_debugmode")) + // return (_settings.data.debugmode ? "checked" : ""); return String(); } diff --git a/src/main.cpp b/src/main.cpp index c247319..a2a90f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -200,7 +200,8 @@ void setup() resetCounter(true); _settings.load(); haAutoDiscTrigger = _settings.data.haDiscovery; - DebugMode = _settings.data.debugmode; + //DebugMode = _settings.data.debugmode; + DebugMode = true; WiFi.persistent(true); // fix wifi save bug // AsyncWiFiManager wm(&server, &dns); // create wifimanager instance @@ -358,7 +359,7 @@ void setup() strncpy(_settings.data.httpUser, request->arg("post_httpUser").c_str(), 40); strncpy(_settings.data.httpPass, request->arg("post_httpPass").c_str(), 40); _settings.data.haDiscovery = (request->arg("post_hadiscovery") == "true") ? true : false; - _settings.data.debugmode = (request->arg("post_debugmode") == "true") ? true : false; + //_settings.data.debugmode = (request->arg("post_debugmode") == "true") ? true : false; _settings.save(); request->redirect("/reboot"); }); diff --git a/src/webpages/HTML_SETTINGS_EDIT.html b/src/webpages/HTML_SETTINGS_EDIT.html index c81396e..3f63fba 100644 --- a/src/webpages/HTML_SETTINGS_EDIT.html +++ b/src/webpages/HTML_SETTINGS_EDIT.html @@ -64,6 +64,7 @@