From 851228fba62d0489a14fc687e521adf0c8f43c76 Mon Sep 17 00:00:00 2001 From: Gregor Baues Date: Mon, 3 May 2021 09:05:05 +0200 Subject: [PATCH] update #1 --- DccMQTT.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DccMQTT.cpp b/DccMQTT.cpp index b160158..12ebf6c 100644 --- a/DccMQTT.cpp +++ b/DccMQTT.cpp @@ -35,8 +35,8 @@ #include #include #include - #include +#include //--------- // Variables @@ -74,8 +74,7 @@ void mqttCallback(char *topic, byte *payload, unsigned int length) topicMessage[0] = '\0'; strcpy(topicName, topic); strlcpy(topicMessage, (char *)payload, length + 1); - Serial.println("some msg arrived"); - DIAG(F("MQTT Message arrived [%s]: %s"), topicName, topicMessage); + DIAG(F("MQTT Message arrived [%s]: [%s]"), topicName, topicMessage); } /** @@ -113,7 +112,7 @@ void DccMQTT::connect() case 6: case 1: { // port(p), ip(i), domain(d), - if (mqttClient.connect(clientID)) + if (mqttClient.connect(connectID)) { DIAG(F("MQTT broker connected ...")); }