* improved mqtt settings

This commit is contained in:
lumapu 2022-08-13 03:07:09 +02:00
parent f92a9509a1
commit f1b19bccfe
4 changed files with 59 additions and 103 deletions

View file

@ -24,6 +24,7 @@
#define VERSION_PATCH 10
//-------------------------------------
typedef struct {
uint8_t rxCh;
@ -157,4 +158,41 @@ typedef enum {
#pragma error "Configure less inverters? (MAX_NUM_INVERTERS=" + MAX_NUM_INVERTERS +")"
#endif
//-------------------------------------
typedef struct {
char broker[MQTT_ADDR_LEN];
uint16_t port;
char user[MQTT_USER_LEN];
char pwd[MQTT_PWD_LEN];
char topic[MQTT_TOPIC_LEN];
} mqttConfig_t;
typedef struct {
char version[12];
char deviceName[DEVNAME_LEN];
// wifi
char stationSsid[SSID_LEN];
char stationPwd[PWD_LEN];
bool apActive;
// nrf24
uint16_t sendInterval;
uint8_t maxRetransPerPyld;
// ntp
char ntpAddr[NTP_ADDR_LEN];
uint16_t ntpPort;
// mqtt
mqttConfig_t mqtt;
// serial
uint16_t serialInterval;
bool serialShowIv;
bool serialDebug;
} config_t;
#endif /*__DEFINES_H__*/