Call init only when MQTT defined

This commit is contained in:
Jaakko Haakana 2025-06-16 20:41:48 +03:00
parent 48a0cf3afa
commit 6fc8cb81c9

View file

@ -120,11 +120,11 @@ void setup() {
.trigger_panic = true // Enable panic reset on timeout
};
init_mqtt();
// Start tasks
#ifdef MQTT
init_mqtt();
xTaskCreatePinnedToCore((TaskFunction_t)&mqtt_loop, "mqtt_loop", 4096, NULL, TASK_MQTT_PRIO, &mqtt_loop_task,
WIFI_CORE);
#endif