Minor tweak to mqtt connection logging (#575)

This commit is contained in:
Darrell 2022-08-05 06:38:16 -04:00 committed by GitHub
parent 90b5d59a41
commit 34e9468058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -285,12 +285,13 @@ void onMqttConnect(bool sessionPresent)
mqttClient.subscribe(setTopic.c_str(), 1);
mqttClient.subscribe(configTopic.c_str(), 1);
GUI::connected(true, true);
Serial.println("Connected to MQTT");
}
void onMqttDisconnect(AsyncMqttClientDisconnectReason reason)
{
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);
online = false;
}