no task for publishing config
This commit is contained in:
parent
bfddd68854
commit
391bd841e9
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user