From 71dcd107a25d4222cf2235d19ccd40e0d85be73f Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Fri, 25 Feb 2022 15:55:45 +0100 Subject: [PATCH] disable prints for petter performance --- mqtt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mqtt.c b/mqtt.c index cb4db50..1b3ad1b 100644 --- a/mqtt.c +++ b/mqtt.c @@ -22,7 +22,7 @@ void messageArrived(MessageData* md) MQTTString* topic = md->topicName; strncpy(_topic_name, topic->lenstring.data, topic->lenstring.len); strncpy(_message, message->payload, message->payloadlen); - printf("<topicName-> /* @@ -39,7 +39,7 @@ void mqtt_pub(Client* mqtt_client, char * mqtt_topic, char * mqtt_msg, int mqtt_ static uint8_t mqtt_err_cnt = 0; int32_t mqtt_rc; - printf(">>MQTT pub msg nr%lu ", ++mqtt_pub_count); + //printf(">>MQTT pub msg nr%lu ", ++mqtt_pub_count); MQTTMessage pubMessage; pubMessage.qos = QOS0; pubMessage.id = mes_id++; @@ -50,11 +50,11 @@ void mqtt_pub(Client* mqtt_client, char * mqtt_topic, char * mqtt_msg, int mqtt_ if (mqtt_rc == SUCCESSS) { mqtt_err_cnt = 0; - printf(" - OK\r\n"); + //printf(" - OK\r\n"); } else { - printf(" - ERROR\r\n"); + printf("mqtt pub - ERROR\r\n"); //Reboot device after 20 continuous errors (~ 20sec) while(1); //if(mqtt_err_cnt++ > 20)