disable prints for petter performance

This commit is contained in:
2022-02-25 15:55:45 +01:00
parent e0baf7e58d
commit 71dcd107a2

8
mqtt.c
View File

@@ -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("<<MQTT Sub: [%s] %s", _topic_name , _message);
//printf("<<MQTT Sub: [%s] %s", _topic_name , _message);
//md->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)