mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-30 18:49:09 +03:00
revert commit 1a03b98, used fixed buffer length
This commit is contained in:
@@ -52,7 +52,8 @@ void EMSuart::uart_event_task(void * pvParameters) {
|
|||||||
uart_read_bytes(EMSUART_NUM, telegram, length, portMAX_DELAY);
|
uart_read_bytes(EMSUART_NUM, telegram, length, portMAX_DELAY);
|
||||||
EMSESP::incoming_telegram(telegram, (uint8_t)(length - 1));
|
EMSESP::incoming_telegram(telegram, (uint8_t)(length - 1));
|
||||||
} else { // flush buffer up to break
|
} else { // flush buffer up to break
|
||||||
uart_flush_input(EMSUART_NUM);
|
uint8_t buf[UART_FIFO_LEN];
|
||||||
|
uart_read_bytes(EMSUART_NUM, buf, length, portMAX_DELAY);
|
||||||
}
|
}
|
||||||
length = 0;
|
length = 0;
|
||||||
} else if (event.type == UART_BUFFER_FULL) {
|
} else if (event.type == UART_BUFFER_FULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user