Feature/mstp valid frame not for us stats (#1053)

* Fixed ISO C90 forbids mixed declarations and code warning.

* Fixed the MS/TP invalid frame counter that was incremented for valid frames not for us.
This commit is contained in:
Steve Karg
2025-08-01 09:58:45 -05:00
committed by GitHub
parent 1bebd6ac81
commit 4095a7f335
15 changed files with 198 additions and 25 deletions
+3 -3
View File
@@ -248,16 +248,16 @@ void RS485_Check_UART_Data(struct mstp_port_struct_t *mstp_port)
uint8_t buf[2048];
ssize_t n;
int handle = RS485_Handle;
SHARED_MSTP_DATA *poSharedData;
FIFO_BUFFER *fifo = &Rx_FIFO;
waiter.tv_sec = 0;
waiter.tv_usec = 5000;
SHARED_MSTP_DATA *poSharedData = (SHARED_MSTP_DATA *)mstp_port->UserData;
poSharedData = (SHARED_MSTP_DATA *)mstp_port->UserData;
if (poSharedData) {
handle = poSharedData->RS485_Handle;
fifo = &poSharedData->Rx_FIFO;
}
if (mstp_port->ReceiveError == true) {
/* do nothing but wait for state machine to clear the error */
} else if (mstp_port->DataAvailable == false) {