From 391bd841e956e3f0d2a9397c04d2063975cd127b Mon Sep 17 00:00:00 2001 From: Nicu Hodos Date: Tue, 11 Oct 2022 10:22:58 +0200 Subject: [PATCH] no task for publishing config --- include/mqtt.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/mqtt.h b/include/mqtt.h index 258b63f..f76a9d1 100644 --- a/include/mqtt.h +++ b/include/mqtt.h @@ -7,10 +7,8 @@ namespace Mqtt { - void publishConfig(); void publishCommand(); void publishBmp280(); - Task tPublishConfig(TASK_IMMEDIATE, TASK_ONCE, publishConfig, &ts); Task tPublish(TASK_SECOND, TASK_FOREVER, publishCommand, &ts); Task tPublishBmp(5 * TASK_MINUTE, TASK_FOREVER, publishBmp280, &ts); @@ -108,7 +106,7 @@ namespace Mqtt { void setup() { client.onConnect([](bool sessionPresent) { - tPublishConfig.enable(); + publishConfig(); tPublish.enableDelayed(); tPublishBmp.enable(); Serial.println("Connected to MQTT");