feat: füge regelmäßige WLAN-Verbindungsüberprüfung hinzu

This commit is contained in:
2025-02-27 09:38:54 +01:00
parent c645035bbe
commit 46cd953b80
3 changed files with 77 additions and 38 deletions

View File

@@ -100,12 +100,20 @@ const unsigned long amsSendInterval = 60000; // 1 minute
uint8_t weightSend = 0;
int16_t lastWeight = 0;
uint8_t wifiErrorCounter = 0;
unsigned long lastWifiCheckTime = 0;
const unsigned long wifiCheckInterval = 60000; // Überprüfe alle 60 Sekunden (60000 ms)
// ##### PROGRAM START #####
void loop() {
unsigned long currentMillis = millis();
// Überprüfe regelmäßig die WLAN-Verbindung
if (millis() - lastWifiCheckTime > wifiCheckInterval) {
checkWiFiConnection();
lastWifiCheckTime = millis();
}
// Send AMS Data min every Minute
if (currentMillis - lastAmsSendTime >= amsSendInterval)
{