From 944f92e588b9ca9fb5c177d0b253d386a788df8b Mon Sep 17 00:00:00 2001 From: fvanroie Date: Fri, 24 May 2024 22:18:57 +0200 Subject: [PATCH] Add mqttEverySecond --- src/mqtt/hasp_mqtt_paho_async.cpp | 7 +++++-- src/mqtt/hasp_mqtt_paho_single.cpp | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mqtt/hasp_mqtt_paho_async.cpp b/src/mqtt/hasp_mqtt_paho_async.cpp index fe1c0d478..28b81d105 100644 --- a/src/mqtt/hasp_mqtt_paho_async.cpp +++ b/src/mqtt/hasp_mqtt_paho_async.cpp @@ -45,7 +45,7 @@ const char FP_CONFIG_GROUP[] PROGMEM = "group"; #include "hasp_mqtt.h" // functions to implement here #include "hasp/hasp_dispatch.h" // for dispatch_topic_payload -#include "hasp_debug.h" // for logging +#include "hasp_debug.h" // for logging #if !defined(_WIN32) #include @@ -436,7 +436,10 @@ void mqttSetup() mqttLwtTopic += MQTT_TOPIC_LWT; } -IRAM_ATTR void mqttLoop(){}; +IRAM_ATTR void mqttLoop() {}; + +void mqttEverySecond() +{} void mqttEvery5Seconds(bool wifiIsConnected) { diff --git a/src/mqtt/hasp_mqtt_paho_single.cpp b/src/mqtt/hasp_mqtt_paho_single.cpp index 653a884fe..500440440 100644 --- a/src/mqtt/hasp_mqtt_paho_single.cpp +++ b/src/mqtt/hasp_mqtt_paho_single.cpp @@ -391,6 +391,9 @@ IRAM_ATTR void mqttLoop() if(rc == MQTTCLIENT_SUCCESS && message) mqtt_message_arrived(mqtt_client, topicName, topicLen, message); }; +void mqttEverySecond() +{} + void mqttEvery5Seconds(bool wifiIsConnected) { if(!mqttIsConnected()) {