Added cnfig parameter to set mqtt publish interval

This commit is contained in:
Thomas Basler
2022-06-16 14:57:12 +02:00
parent 52b5cdbdb6
commit 7e0807bda6
5 changed files with 21 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
#include <Arduino.h>
#define CONFIG_FILENAME "/config.bin"
#define CONFIG_VERSION 0x00010900 // 0.1.9 // make sure to clean all after change
#define CONFIG_VERSION 0x00011000 // 0.1.10 // make sure to clean all after change
#define WIFI_MAX_SSID_STRLEN 31
#define WIFI_MAX_PASSWORD_STRLEN 31
@@ -61,6 +61,8 @@ struct CONFIG_T {
uint64_t Dtu_Serial;
uint32_t Dtu_PollInterval;
uint8_t Dtu_PaLevel;
uint32_t Mqtt_PublishInterval;
};
class ConfigurationClass {

View File

@@ -31,6 +31,7 @@
#define MQTT_LWT_TOPIC "dtu/status"
#define MQTT_LWT_ONLINE "online"
#define MQTT_LWT_OFFLINE "offline"
#define MQTT_PUBLISH_INTERVAL 5
#define DTU_SERIAL 99978563412
#define DTU_POLL_INTERVAL 5