Add connection error handling to display: show error messages for registration and API connection issues

This commit is contained in:
Manuel Weiser committed 2026-02-20 11:03:14 +01:00
1 parent f29e6aeded
commit 86973c07ec
4 files changed
+33 -16

No files matched your search

-16
View File
@@ -4,7 +4,6 @@
#include <esp_wifi.h>
#include <WiFiManager.h>
#include <DNSServer.h>
#include <ESPmDNS.h>
#include "display.h"
#include "config.h"
@@ -29,17 +28,6 @@ void wifiSettings() {
esp_wifi_set_rssi_threshold(-80);
}
void startMDNS() {
if (!MDNS.begin("filaman")) {
Serial.println("Error setting up MDNS responder!");
while(1) {
vTaskDelay(pdMS_TO_TICKS(1000));
}
}
MDNS.addService("http", "tcp", 80);
Serial.println("mDNS responder started");
}
void configModeCallback (WiFiManager *myWiFiManager) {
Serial.println("Entered config mode");
oledShowTopRow();
@@ -80,9 +68,6 @@ void initWiFi() {
Serial.println(WiFi.localIP());
oledShowTopRow();
// mDNS
startMDNS();
}
}
@@ -114,7 +99,6 @@ void checkWiFiConnection() {
wifiErrorCounter = 0;
wifiOn = true;
oledShowTopRow();
startMDNS();
}
}