fix: handle Bambu connection state by introducing bambuDisabled flag
This commit is contained in:
parent
e040a736b0
commit
024056cb7d
@ -607,14 +607,13 @@ bool setupMqtt() {
|
||||
bool success = loadBambuCredentials();
|
||||
|
||||
if (!success) {
|
||||
Serial.println("Failed to load Bambu credentials");
|
||||
oledShowMessage("Bambu Credentials Missing");
|
||||
vTaskDelay(2000 / portTICK_PERIOD_MS);
|
||||
bambuDisabled = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (success && bambu_ip != "" && bambu_accesscode != "" && bambu_serialnr != "")
|
||||
{
|
||||
bambuDisabled = false;
|
||||
sslClient.setCACert(root_ca);
|
||||
sslClient.setInsecure();
|
||||
client.setServer(bambu_ip, 8883);
|
||||
|
@ -100,7 +100,7 @@ void loop() {
|
||||
// Wenn Bambu auto set Spool aktiv
|
||||
if (autoSendToBambu && autoSetToBambuSpoolId > 0)
|
||||
{
|
||||
if (!bambu_connected)
|
||||
if (!bambuDisabled && !bambu_connected)
|
||||
{
|
||||
bambu_restart();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user