From 2deb84e3e10c47efea13eb1a9f90d209ea4b5695 Mon Sep 17 00:00:00 2001 From: proddy Date: Fri, 27 Nov 2020 20:52:51 +0100 Subject: [PATCH] make linter happy --- src/uart/emsuart_esp32.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/uart/emsuart_esp32.cpp b/src/uart/emsuart_esp32.cpp index 19f1945a6..0599b1813 100644 --- a/src/uart/emsuart_esp32.cpp +++ b/src/uart/emsuart_esp32.cpp @@ -57,12 +57,11 @@ void EMSuart::emsuart_recvTask(void * para) { * UART interrupt, on break read the fifo and put the whole telegram to ringbuffer */ void IRAM_ATTR EMSuart::emsuart_rx_intr_handler(void * para) { - static uint8_t rxbuf[EMS_MAXBUFFERSIZE]; - static uint8_t length; portENTER_CRITICAL(&mux); if (EMS_UART.int_st.brk_det) { EMS_UART.int_clr.brk_det = 1; // clear flag - length = 0; + uint8_t rxbuf[EMS_MAXBUFFERSIZE]; + uint8_t length = 0; while (EMS_UART.status.rxfifo_cnt) { uint8_t rx = EMS_UART.fifo.rw_byte; // read all bytes from fifo if (length < EMS_MAXBUFFERSIZE) {