fix: add WiFi connection check and restart Bambu if not connected

This commit is contained in:
Manuel Weiser 2025-03-23 11:03:51 +01:00
parent e4fe08f54c
commit a09fd4fda4

View File

@ -92,12 +92,19 @@ void loop() {
unsigned long currentMillis = millis();
// Überprüfe regelmäßig die WLAN-Verbindung
if (intervalElapsed(currentMillis, lastWifiCheckTime, wifiCheckInterval)) {
if (intervalElapsed(currentMillis, lastWifiCheckTime, wifiCheckInterval))
{
checkWiFiConnection();
}
// Wenn Bambu auto set Spool aktiv
if (autoSendToBambu && autoSetToBambuSpoolId > 0) {
if (autoSendToBambu && autoSetToBambuSpoolId > 0)
{
if (!bambu_connected)
{
bambu_restart();
}
if (intervalElapsed(currentMillis, lastAutoSetBambuAmsTime, autoSetBambuAmsInterval))
{
if (hasReadRfidTag == 0)