From f0fbe50a266b2a9d43844a3f7ca6bc7b1f5dbbc9 Mon Sep 17 00:00:00 2001 From: bogd Date: Tue, 17 Oct 2023 16:13:57 +0200 Subject: [PATCH] fix serial port disable in build configuration --- src/MQTT.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MQTT.c b/src/MQTT.c index cf1e154..ff4b81d 100644 --- a/src/MQTT.c +++ b/src/MQTT.c @@ -217,7 +217,7 @@ static void mqtt_system_event_handler(int idx, void *handler_args, esp_event_bas ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); ESP_LOGI(TAG, "Subscribe to %s", topic); #endif - +#ifdef CONFIG_WEBGUIAPP_UART_TRANSPORT_ENABLE if (GetSysConf()->serialSettings.Flags.IsBridgeEnabled) { ComposeTopic(topic, idx, EXTERNAL_SERVICE_NAME, DOWNLINK_SUBTOPIC); @@ -228,7 +228,7 @@ static void mqtt_system_event_handler(int idx, void *handler_args, esp_event_bas ESP_LOGI(TAG, "Subscribe to %s", topic); #endif } - +#endif break; case MQTT_EVENT_DISCONNECTED: @@ -289,7 +289,7 @@ static void mqtt_system_event_handler(int idx, void *handler_args, esp_event_bas ESP_LOGE(TAG, "Out of free RAM for MQTT API handle"); } - +#ifdef CONFIG_WEBGUIAPP_UART_TRANSPORT_ENABLE if (GetSysConf()->serialSettings.Flags.IsBridgeEnabled) { ComposeTopic(topic, idx, EXTERNAL_SERVICE_NAME, DOWNLINK_SUBTOPIC); @@ -298,7 +298,7 @@ static void mqtt_system_event_handler(int idx, void *handler_args, esp_event_bas TransmitSerialPort(event->data, event->data_len); } } - +#endif break; case MQTT_EVENT_ERROR: ESP_LOGE(TAG, "MQTT_EVENT_ERROR, client %d", idx);