Skip to content

Commit

Permalink
Add mqttEverySecond
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanroie committed May 24, 2024
1 parent b118e56 commit 944f92e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/mqtt/hasp_mqtt_paho_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <unistd.h>
Expand Down Expand Up @@ -436,7 +436,10 @@ void mqttSetup()
mqttLwtTopic += MQTT_TOPIC_LWT;
}

IRAM_ATTR void mqttLoop(){};
IRAM_ATTR void mqttLoop() {};

void mqttEverySecond()
{}

void mqttEvery5Seconds(bool wifiIsConnected)
{
Expand Down
3 changes: 3 additions & 0 deletions src/mqtt/hasp_mqtt_paho_single.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 944f92e

Please sign in to comment.