mirror of
https://github.com/espressif/esp-modbus.git
synced 2025-07-30 02:17:17 +02:00
master fix send fsm broadcast frame detection
This commit is contained in:
@ -437,7 +437,8 @@ xMBMasterASCIITransmitFSM( void )
|
||||
/* Notify the task which called eMBMasterASCIISend that the frame has
|
||||
* been sent. */
|
||||
case STATE_M_TX_NOTIFY:
|
||||
xFrameIsBroadcast = ( ucMasterASCIISndBuf[MB_SER_PDU_ADDR_OFF] == MB_ADDRESS_BROADCAST ) ? TRUE : FALSE;
|
||||
xFrameIsBroadcast = ( ucMasterASCIISndBuf[MB_SEND_BUF_PDU_OFF - MB_SER_PDU_PDU_OFF]
|
||||
== MB_ADDRESS_BROADCAST ) ? TRUE : FALSE;
|
||||
vMBMasterRequestSetType( xFrameIsBroadcast );
|
||||
eSndState = STATE_M_TX_XFWR;
|
||||
/* If the frame is broadcast ,master will enable timer of convert delay,
|
||||
|
@ -350,7 +350,8 @@ xMBMasterRTUTransmitFSM( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
xFrameIsBroadcast = ( ucMasterRTUSndBuf[MB_SER_PDU_ADDR_OFF] == MB_ADDRESS_BROADCAST ) ? TRUE : FALSE;
|
||||
xFrameIsBroadcast = ( ucMasterRTUSndBuf[MB_SEND_BUF_PDU_OFF - MB_SER_PDU_PDU_OFF]
|
||||
== MB_ADDRESS_BROADCAST ) ? TRUE : FALSE;
|
||||
vMBMasterRequestSetType( xFrameIsBroadcast );
|
||||
eSndState = STATE_M_TX_XFWR;
|
||||
/* If the frame is broadcast ,master will enable timer of convert delay,
|
||||
|
Reference in New Issue
Block a user