refactor: remove unnecessary delay in MQTT setup and add delay before restart
This commit is contained in:
		| @@ -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(); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user