no task for publishing config
This commit is contained in:
parent
bfddd68854
commit
391bd841e9
@ -7,10 +7,8 @@
|
|||||||
|
|
||||||
namespace Mqtt {
|
namespace Mqtt {
|
||||||
|
|
||||||
void publishConfig();
|
|
||||||
void publishCommand();
|
void publishCommand();
|
||||||
void publishBmp280();
|
void publishBmp280();
|
||||||
Task tPublishConfig(TASK_IMMEDIATE, TASK_ONCE, publishConfig, &ts);
|
|
||||||
Task tPublish(TASK_SECOND, TASK_FOREVER, publishCommand, &ts);
|
Task tPublish(TASK_SECOND, TASK_FOREVER, publishCommand, &ts);
|
||||||
Task tPublishBmp(5 * TASK_MINUTE, TASK_FOREVER, publishBmp280, &ts);
|
Task tPublishBmp(5 * TASK_MINUTE, TASK_FOREVER, publishBmp280, &ts);
|
||||||
|
|
||||||
@ -108,7 +106,7 @@ namespace Mqtt {
|
|||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
client.onConnect([](bool sessionPresent) {
|
client.onConnect([](bool sessionPresent) {
|
||||||
tPublishConfig.enable();
|
publishConfig();
|
||||||
tPublish.enableDelayed();
|
tPublish.enableDelayed();
|
||||||
tPublishBmp.enable();
|
tPublishBmp.enable();
|
||||||
Serial.println("Connected to MQTT");
|
Serial.println("Connected to MQTT");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user