mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-03 14:49:33 +00:00
Fixed mqtt changed flag
This commit is contained in:
@@ -17,6 +17,7 @@ class AmsMqttHandler {
|
|||||||
public:
|
public:
|
||||||
AmsMqttHandler(MqttConfig& mqttConfig, RemoteDebug* debugger, char* buf) {
|
AmsMqttHandler(MqttConfig& mqttConfig, RemoteDebug* debugger, char* buf) {
|
||||||
this->mqttConfig = mqttConfig;
|
this->mqttConfig = mqttConfig;
|
||||||
|
this->mqttConfigChanged = true;
|
||||||
this->debugger = debugger;
|
this->debugger = debugger;
|
||||||
this->json = buf;
|
this->json = buf;
|
||||||
mqtt.dropOverflow(true);
|
mqtt.dropOverflow(true);
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ bool AmsMqttHandler::connect() {
|
|||||||
actualClient = mqttClient;
|
actualClient = mqttClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mqttConfigChanged = false;
|
||||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf_P(PSTR("Connecting to MQTT %s:%d\n"), mqttConfig.host, mqttConfig.port);
|
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf_P(PSTR("Connecting to MQTT %s:%d\n"), mqttConfig.host, mqttConfig.port);
|
||||||
|
|
||||||
mqtt.begin(mqttConfig.host, mqttConfig.port, *actualClient);
|
mqtt.begin(mqttConfig.host, mqttConfig.port, *actualClient);
|
||||||
|
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
|
|||||||
Reference in New Issue
Block a user