MQTT services definitions moved to mqtt header

This commit is contained in:
Bogdan Pilyugin 2024-05-16 21:12:49 +02:00
parent 92a1cc3cc7
commit 9f20a1b08b
3 changed files with 6 additions and 6 deletions

View File

@ -47,6 +47,10 @@ typedef int mqtt_app_err_t;
#define API_FILE_EMPTY_ERR 15
#define API_UNKNOWN_ERR 16
#define EXTERNAL_SERVICE_NAME "RS485"
#define UPLINK_SUBTOPIC "UPLINK" // Device publish to this topic
#define DOWNLINK_SUBTOPIC "DWLINK" // Device listen from this topic
typedef struct
{
char topic[CONFIG_WEBGUIAPP_MQTT_MAX_TOPIC_LENGTH];

View File

@ -29,10 +29,6 @@
#define TAG "MQTT"
#define SERVICE_NAME "SYSTEM" // Dedicated service name
#define EXTERNAL_SERVICE_NAME "RS485"
#define UPLINK_SUBTOPIC "UPLINK" // Device publish to this topic
#define DOWNLINK_SUBTOPIC "DWLINK" // Device listen from this topic
#define MQTT_DEBUG_MODE CONFIG_WEBGUIAPP_MQTT_DEBUG_LEVEL
#define MQTT_MESSAGE_BUFER_LENTH 10 //size of mqtt queue

View File

@ -131,8 +131,8 @@ void serial_RX_task(void *arg)
if (GetSysConf()->serialSettings.Flags.IsBridgeEnabled)
{
ExternalServiceMQTTSend(rxbuf, buffered_size, 0);
ExternalServiceMQTTSend(rxbuf, buffered_size, 1);
ExternalServiceMQTTSend(EXTERNAL_SERVICE_NAME, rxbuf, buffered_size, 0);
ExternalServiceMQTTSend(EXTERNAL_SERVICE_NAME, rxbuf, buffered_size, 1);
}
else
ReceiveHandlerAPI();