refactor: remove unnecessary delay in MQTT setup and add delay before restart

This commit is contained in:
Manuel Weiser 2025-03-03 16:58:24 +01:00
parent 5afb60df32
commit 8a558c3121

View File

@ -603,7 +603,6 @@ void mqtt_loop(void * parameter) {
bool setupMqtt() {
// Wenn Bambu Daten vorhanden
bool success = loadBambuCredentials();
vTaskDelay(100 / portTICK_PERIOD_MS);
if (!success) {
Serial.println("Failed to load Bambu credentials");
@ -667,6 +666,7 @@ bool setupMqtt() {
void bambu_restart() {
if (BambuMqttTask) {
vTaskDelete(BambuMqttTask);
delay(10);
}
setupMqtt();
}