mirror of
https://github.com/espressif/esp-modbus.git
synced 2025-07-30 10:27:16 +02:00
Merge branch 'bugfix/master_rtu_ascii_fix_deadlock_when_null_received' into 'master'
Bugfix/master rtu ascii fix deadlock when null received Closes IDFGH-9942 See merge request idf/esp-modbus!40
This commit is contained in:
@ -274,8 +274,8 @@ xMBMasterASCIIReceiveFSM( void )
|
|||||||
usMasterRcvBufferPos = 0;
|
usMasterRcvBufferPos = 0;
|
||||||
eBytePos = BYTE_HIGH_NIBBLE;
|
eBytePos = BYTE_HIGH_NIBBLE;
|
||||||
eRcvState = STATE_M_RX_RCV;
|
eRcvState = STATE_M_RX_RCV;
|
||||||
|
eSndState = STATE_M_TX_IDLE;
|
||||||
}
|
}
|
||||||
eSndState = STATE_M_TX_IDLE;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* A new character is received. If the character is a ':' the input
|
/* A new character is received. If the character is a ':' the input
|
||||||
|
@ -284,12 +284,12 @@ xMBMasterRTUReceiveFSM( void )
|
|||||||
* Disable timer of respond timeout and change the transmiter state to idle.
|
* Disable timer of respond timeout and change the transmiter state to idle.
|
||||||
*/
|
*/
|
||||||
vMBMasterPortTimersDisable( );
|
vMBMasterPortTimersDisable( );
|
||||||
eSndState = STATE_M_TX_IDLE;
|
|
||||||
|
|
||||||
usMasterRcvBufferPos = 0;
|
usMasterRcvBufferPos = 0;
|
||||||
if( xStatus && ucByte ) {
|
if( xStatus && ucByte ) {
|
||||||
ucMasterRTURcvBuf[usMasterRcvBufferPos++] = ucByte;
|
ucMasterRTURcvBuf[usMasterRcvBufferPos++] = ucByte;
|
||||||
eRcvState = STATE_M_RX_RCV;
|
eRcvState = STATE_M_RX_RCV;
|
||||||
|
eSndState = STATE_M_TX_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable t3.5 timers. */
|
/* Enable t3.5 timers. */
|
||||||
|
Reference in New Issue
Block a user