From dd9b726b5e4ffaa1f17a1fc096ba7fed8fc9e2b7 Mon Sep 17 00:00:00 2001 From: skarg Date: Thu, 21 Sep 2006 11:17:10 +0000 Subject: [PATCH] corrected state transition in WAIT FOR REPLY state. --- bacnet-stack/ports/pic18/mstp.c | 3 ++- bacnet-stack/ports/rtos32/mstp.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/ports/pic18/mstp.c b/bacnet-stack/ports/pic18/mstp.c index c604366c..e21e515c 100644 --- a/bacnet-stack/ports/pic18/mstp.c +++ b/bacnet-stack/ports/pic18/mstp.c @@ -881,6 +881,7 @@ bool MSTP_Master_Node_FSM(volatile struct mstp_port_struct_t *mstp_port) mstp_port->ReceivedInvalidFrame = false; mstp_port->master_state = MSTP_MASTER_STATE_DONE_WITH_TOKEN; + transition_now = true; } else if (mstp_port->ReceivedValidFrame == true) { if (mstp_port->DestinationAddress == mstp_port->This_Station) { @@ -918,8 +919,8 @@ bool MSTP_Master_Node_FSM(volatile struct mstp_port_struct_t *mstp_port) mstp_port->master_state = MSTP_MASTER_STATE_IDLE; } mstp_port->ReceivedValidFrame = false; + transition_now = true; } - transition_now = true; } break; /* The DONE_WITH_TOKEN state either sends another data frame, */ diff --git a/bacnet-stack/ports/rtos32/mstp.c b/bacnet-stack/ports/rtos32/mstp.c index c604366c..e21e515c 100644 --- a/bacnet-stack/ports/rtos32/mstp.c +++ b/bacnet-stack/ports/rtos32/mstp.c @@ -881,6 +881,7 @@ bool MSTP_Master_Node_FSM(volatile struct mstp_port_struct_t *mstp_port) mstp_port->ReceivedInvalidFrame = false; mstp_port->master_state = MSTP_MASTER_STATE_DONE_WITH_TOKEN; + transition_now = true; } else if (mstp_port->ReceivedValidFrame == true) { if (mstp_port->DestinationAddress == mstp_port->This_Station) { @@ -918,8 +919,8 @@ bool MSTP_Master_Node_FSM(volatile struct mstp_port_struct_t *mstp_port) mstp_port->master_state = MSTP_MASTER_STATE_IDLE; } mstp_port->ReceivedValidFrame = false; + transition_now = true; } - transition_now = true; } break; /* The DONE_WITH_TOKEN state either sends another data frame, */