Remove old method to disable webserver to save flash

This commit is contained in:
Daniel Öster 2025-09-16 14:44:30 +03:00
parent e11843e4a0
commit 79964a0601
3 changed files with 5 additions and 16 deletions

View file

@ -86,9 +86,7 @@ void connectivity_loop(void*) {
// Init wifi
init_WiFi();
if (webserver_enabled) {
init_webserver();
}
if (mdns_enabled) {
init_mDNS();
@ -98,9 +96,7 @@ void connectivity_loop(void*) {
START_TIME_MEASUREMENT(wifi);
wifi_monitor();
if (webserver_enabled) {
ota_monitor();
}
END_TIME_MEASUREMENT_MAX(wifi, datalayer.system.status.wifi_task_10s_max_us);
@ -388,11 +384,9 @@ void core_loop(void*) {
END_TIME_MEASUREMENT_MAX(comm, datalayer.system.status.time_comm_us);
if (webserver_enabled) {
START_TIME_MEASUREMENT(ota);
ElegantOTA.loop();
END_TIME_MEASUREMENT_MAX(ota, datalayer.system.status.time_ota_us);
}
// Process
currentMillis = millis();

View file

@ -23,9 +23,6 @@
extern std::string http_username;
extern std::string http_password;
bool webserver_enabled =
true; // Global flag to enable or disable the webserver //Old method to disable was with #ifdef WEBSERVER
bool webserver_auth = false;
// Create AsyncWebServer object on port 80

View file

@ -7,8 +7,6 @@
#include "../../lib/ayushsharma82-ElegantOTA/src/ElegantOTA.h"
#include "../../lib/mathieucarbou-AsyncTCPSock/src/AsyncTCP.h"
extern bool webserver_enabled;
extern const char* version_number; // The current software version, shown on webserver
// Common charger parameters