Optimised memory use for wifi config

This commit is contained in:
Sjef Verhoeven PE5PVB
2025-01-12 20:28:34 +01:00
parent f7ce5b0620
commit d94a7bb064
4 changed files with 11 additions and 4 deletions

View File

@@ -911,6 +911,9 @@ void tryWiFi() {
if (wc.autoConnect()) {
Server.begin();
Udp.begin(9031);
webserver.on("/", handleRoot);
webserver.on("/downloadCSV", HTTP_GET, handleDownloadCSV);
webserver.on("/logo.png", handleLogo);
webserver.begin();
NTPupdate();
remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
@@ -927,6 +930,7 @@ void tryWiFi() {
}
} else {
Server.end();
webserver.stop();
Udp.stop();
WiFi.mode(WIFI_OFF);
}