fix: add WiFi connection check and restart Bambu if not connected
This commit is contained in:
parent
e4fe08f54c
commit
a09fd4fda4
11
src/main.cpp
11
src/main.cpp
@ -92,12 +92,19 @@ void loop() {
|
|||||||
unsigned long currentMillis = millis();
|
unsigned long currentMillis = millis();
|
||||||
|
|
||||||
// Überprüfe regelmäßig die WLAN-Verbindung
|
// Überprüfe regelmäßig die WLAN-Verbindung
|
||||||
if (intervalElapsed(currentMillis, lastWifiCheckTime, wifiCheckInterval)) {
|
if (intervalElapsed(currentMillis, lastWifiCheckTime, wifiCheckInterval))
|
||||||
|
{
|
||||||
checkWiFiConnection();
|
checkWiFiConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wenn Bambu auto set Spool aktiv
|
// 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 (intervalElapsed(currentMillis, lastAutoSetBambuAmsTime, autoSetBambuAmsInterval))
|
||||||
{
|
{
|
||||||
if (hasReadRfidTag == 0)
|
if (hasReadRfidTag == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user