mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 21:56:35 +00:00
Add mqttEverySecond
This commit is contained in:
parent
b118e56245
commit
944f92e588
@ -45,7 +45,7 @@ const char FP_CONFIG_GROUP[] PROGMEM = "group";
|
|||||||
#include "hasp_mqtt.h" // functions to implement here
|
#include "hasp_mqtt.h" // functions to implement here
|
||||||
|
|
||||||
#include "hasp/hasp_dispatch.h" // for dispatch_topic_payload
|
#include "hasp/hasp_dispatch.h" // for dispatch_topic_payload
|
||||||
#include "hasp_debug.h" // for logging
|
#include "hasp_debug.h" // for logging
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -436,7 +436,10 @@ void mqttSetup()
|
|||||||
mqttLwtTopic += MQTT_TOPIC_LWT;
|
mqttLwtTopic += MQTT_TOPIC_LWT;
|
||||||
}
|
}
|
||||||
|
|
||||||
IRAM_ATTR void mqttLoop(){};
|
IRAM_ATTR void mqttLoop() {};
|
||||||
|
|
||||||
|
void mqttEverySecond()
|
||||||
|
{}
|
||||||
|
|
||||||
void mqttEvery5Seconds(bool wifiIsConnected)
|
void mqttEvery5Seconds(bool wifiIsConnected)
|
||||||
{
|
{
|
||||||
|
@ -391,6 +391,9 @@ IRAM_ATTR void mqttLoop()
|
|||||||
if(rc == MQTTCLIENT_SUCCESS && message) mqtt_message_arrived(mqtt_client, topicName, topicLen, message);
|
if(rc == MQTTCLIENT_SUCCESS && message) mqtt_message_arrived(mqtt_client, topicName, topicLen, message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void mqttEverySecond()
|
||||||
|
{}
|
||||||
|
|
||||||
void mqttEvery5Seconds(bool wifiIsConnected)
|
void mqttEvery5Seconds(bool wifiIsConnected)
|
||||||
{
|
{
|
||||||
if(!mqttIsConnected()) {
|
if(!mqttIsConnected()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user