diff --git a/bacnet-stack/demo/mstpcap/main.c b/bacnet-stack/demo/mstpcap/main.c index bb1c7149..0c05744e 100644 --- a/bacnet-stack/demo/mstpcap/main.c +++ b/bacnet-stack/demo/mstpcap/main.c @@ -71,8 +71,6 @@ static volatile struct mstp_port_struct_t MSTP_Port; /* track the receive state to know when there is a broken packet */ static MSTP_RECEIVE_STATE MSTP_Receive_State = MSTP_RECEIVE_STATE_IDLE; -/* track the bytes that are incoming to know when to check for loss */ -static bool DataAvailable; /* buffers needed by mstp port struct */ static uint8_t RxBuffer[MAX_MPDU]; static uint8_t TxBuffer[MAX_MPDU]; @@ -1176,7 +1174,6 @@ int main( /* run forever */ for (;;) { RS485_Check_UART_Data(mstp_port); - DataAvailable = mstp_port->DataAvailable; MSTP_Receive_Frame_FSM(mstp_port); /* process the data portion of the frame */ if (mstp_port->ReceivedValidFrame) { @@ -1195,8 +1192,7 @@ int main( mstp_structure_init(mstp_port); Invalid_Frame_Count++; packet_count++; - } else if ((mstp_port->receive_state == MSTP_RECEIVE_STATE_IDLE) && - (DataAvailable)) { + } else if (mstp_port->receive_state == MSTP_RECEIVE_STATE_IDLE) { if (MSTP_Receive_State == MSTP_RECEIVE_STATE_IDLE) { if (mstp_port->EventCount) { write_received_packet(mstp_port, 1);