From 02375d6b28647529c6dc55cd5fba66d17b97ab7b Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 1 Jun 2020 15:45:22 +0200 Subject: [PATCH] Update TasmotaSerial.cpp --- lib/TasmotaSerial-3.0.0/src/TasmotaSerial.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/TasmotaSerial-3.0.0/src/TasmotaSerial.cpp b/lib/TasmotaSerial-3.0.0/src/TasmotaSerial.cpp index 7a09518c2..6982779d5 100644 --- a/lib/TasmotaSerial-3.0.0/src/TasmotaSerial.cpp +++ b/lib/TasmotaSerial-3.0.0/src/TasmotaSerial.cpp @@ -174,7 +174,9 @@ bool TasmotaSerial::begin(long speed, int stop_bits) { m_uart = tasmota_serial_index; tasmota_serial_index--; TSerial = new HardwareSerial(m_uart); - if (TM_SERIAL_BUFFER_SIZE != serial_buffer_size) TSerial->setRxBufferSize(serial_buffer_size); + if (serial_buffer_size > 256) { + TSerial->setRxBufferSize(serial_buffer_size); + } if (2 == m_stop_bits) { TSerial->begin(speed, SERIAL_8N2, m_rx_pin, m_tx_pin); } else {