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:
@@ -165,11 +165,13 @@ static void dlmstp_receive_fsm_task(void *pArg)
|
||||
while (TRUE) {
|
||||
/* only do receive state machine while we don't have a frame */
|
||||
if ((MSTP_Port.ReceivedValidFrame == false) &&
|
||||
(MSTP_Port.ReceivedValidFrameNotForUs == false) &&
|
||||
(MSTP_Port.ReceivedInvalidFrame == false)) {
|
||||
do {
|
||||
RS485_Check_UART_Data(&MSTP_Port);
|
||||
MSTP_Receive_Frame_FSM(&MSTP_Port);
|
||||
received_frame = MSTP_Port.ReceivedValidFrame ||
|
||||
MSTP_Port.ReceivedValidFrameNotForUs ||
|
||||
MSTP_Port.ReceivedInvalidFrame;
|
||||
if (received_frame) {
|
||||
ReleaseSemaphore(Received_Frame_Flag, 1, NULL);
|
||||
|
||||
Reference in New Issue
Block a user