mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
ignore null telegrams
This commit is contained in:
@@ -71,14 +71,9 @@ static void emsuart_rx_intr_handler(void * para) {
|
||||
* The full buffer is sent to the ems_parseTelegram() function in ems.cpp.
|
||||
*/
|
||||
static void ICACHE_FLASH_ATTR emsuart_recvTask(os_event_t * events) {
|
||||
// get next free EMS Receive buffer
|
||||
_EMSRxBuf * pCurrent = pEMSRxBuf;
|
||||
pEMSRxBuf = paEMSRxBuf[++emsRxBufIdx % EMS_MAXBUFFERS];
|
||||
|
||||
// transmit EMS buffer, excluding the BRK
|
||||
if (pCurrent->writePtr > 1) {
|
||||
ems_parseTelegram((uint8_t *)pCurrent->buffer, (pCurrent->writePtr) - 1);
|
||||
}
|
||||
ems_parseTelegram((uint8_t *)pCurrent->buffer, (pCurrent->writePtr) - 1); // transmit EMS buffer, excluding the BRK
|
||||
pEMSRxBuf = paEMSRxBuf[++emsRxBufIdx % EMS_MAXBUFFERS]; // next free EMS Receive buffer
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user