From 36dde2c0633336ed1e9508b6fc537daa218eb919 Mon Sep 17 00:00:00 2001 From: hsaturn Date: Mon, 9 Aug 2021 11:24:27 +0200 Subject: [PATCH] Fix for debugging for other platform than ESP --- src/TinyMqtt.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/TinyMqtt.cpp b/src/TinyMqtt.cpp index a61245d..9e164a7 100644 --- a/src/TinyMqtt.cpp +++ b/src/TinyMqtt.cpp @@ -397,7 +397,11 @@ void MqttClient::processMessage(const MqttMessage* mesg) #ifdef TINY_MQTT_DEBUG if (mesg->type() != MqttMessage::Type::PingReq && mesg->type() != MqttMessage::Type::PingResp) { - Serial << "---> INCOMING " << _HEX(mesg->type()) << " client(" << (dbg_ptr)client << ':' << clientId << ") mem=" << ESP.getFreeHeap() << endl; +#ifdef NOT_ESP_CORE + Serial << "---> INCOMING " << _HEX(mesg->type()) << " client(" << (dbg_ptr)client << ':' << clientId << ") mem=" << " ESP.getFreeHeap() "<< endl; +#else + Serial << "---> INCOMING " << _HEX(mesg->type()) << " client(" << (dbg_ptr)client << ':' << clientId << ") mem=" << ESP.getFreeHeap() << endl; +#endif // mesg->hexdump("Incoming"); } #endif