Minor tweak to mqtt connection logging (#575)
This commit is contained in:
parent
90b5d59a41
commit
34e9468058
|
@ -285,12 +285,13 @@ void onMqttConnect(bool sessionPresent)
|
||||||
mqttClient.subscribe(setTopic.c_str(), 1);
|
mqttClient.subscribe(setTopic.c_str(), 1);
|
||||||
mqttClient.subscribe(configTopic.c_str(), 1);
|
mqttClient.subscribe(configTopic.c_str(), 1);
|
||||||
GUI::connected(true, true);
|
GUI::connected(true, true);
|
||||||
|
Serial.println("Connected to MQTT");
|
||||||
}
|
}
|
||||||
|
|
||||||
void onMqttDisconnect(AsyncMqttClientDisconnectReason reason)
|
void onMqttDisconnect(AsyncMqttClientDisconnectReason reason)
|
||||||
{
|
{
|
||||||
GUI::connected(true, false);
|
GUI::connected(true, false);
|
||||||
log_e("Disconnected from MQTT; reason %d\n", reason);
|
Serial.printf("Disconnected from MQTT; reason %d\n", reason);
|
||||||
xTimerStart(reconnectTimer, 0);
|
xTimerStart(reconnectTimer, 0);
|
||||||
online = false;
|
online = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue