diff --git a/src/SerialPort.c b/src/SerialPort.c index 7d4d4a6..b86dbb0 100644 --- a/src/SerialPort.c +++ b/src/SerialPort.c @@ -34,6 +34,7 @@ #include #include #include +#include "SysConfiguration.h" #include "webguiapp.h" #include "driver/gpio.h" @@ -64,6 +65,8 @@ static char rxbuf[CONFIG_WEBGUIAPP_UART_BUF_SIZE]; esp_err_t TransmitSerialPort(char *data, int ln) { + if(!GetSysConf()->serialSettings.Flags.IsSerialEnabled) + return ESP_ERR_NOT_ALLOWED; UART_DATA_SEND_STRUCT DSS; char *buf = malloc(ln); if (!buf)