Bugfix/master rtu ascii fix deadlock when null received

This commit is contained in:
Alex Lisitsyn
2023-06-15 23:43:37 +08:00
parent cd34b914d3
commit 7cdafc2468
2 changed files with 2 additions and 2 deletions

View File

@ -274,8 +274,8 @@ xMBMasterASCIIReceiveFSM( void )
usMasterRcvBufferPos = 0;
eBytePos = BYTE_HIGH_NIBBLE;
eRcvState = STATE_M_RX_RCV;
eSndState = STATE_M_TX_IDLE;
}
eSndState = STATE_M_TX_IDLE;
break;
/* A new character is received. If the character is a ':' the input

View File

@ -284,12 +284,12 @@ xMBMasterRTUReceiveFSM( void )
* Disable timer of respond timeout and change the transmiter state to idle.
*/
vMBMasterPortTimersDisable( );
eSndState = STATE_M_TX_IDLE;
usMasterRcvBufferPos = 0;
if( xStatus && ucByte ) {
ucMasterRTURcvBuf[usMasterRcvBufferPos++] = ucByte;
eRcvState = STATE_M_RX_RCV;
eSndState = STATE_M_TX_IDLE;
}
/* Enable t3.5 timers. */