File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ xMBRTUReceiveFSM( void )
245245 BOOL xStatus = FALSE;
246246 UCHAR ucByte ;
247247
248- assert ( eSndState == STATE_TX_IDLE );
248+ if ( eSndState != STATE_TX_IDLE ) {
249+ return FALSE;
250+ }
249251
250252 /* Always read the character. */
251253 xStatus = xMBPortSerialGetByte ( ( CHAR * ) & ucByte );
@@ -307,7 +309,9 @@ xMBRTUTransmitFSM( void )
307309{
308310 BOOL xNeedPoll = TRUE;
309311
310- assert ( eRcvState == STATE_RX_IDLE );
312+ if ( eRcvState != STATE_RX_IDLE ) {
313+ return FALSE;
314+ }
311315
312316 switch ( eSndState )
313317 {
Original file line number Diff line number Diff line change 1- version : " 1.0.17 "
1+ version : " 1.0.18 "
22description : ESP-MODBUS is the official Modbus library for Espressif SoCs.
33url : https://github.com/espressif/esp-modbus
44dependencies :
You can’t perform that action at this time.
0 commit comments