Making sure that RX slots open after state change

After transmission we should change the state before invoking opening of
slots as we may start receiving in the rx slots and the state would
suddenly change from SENDING to RECEIVING without going through the
ACK_WAIT state (in case of CONFIRMED messages). Tests show that after
this slight adjustment, our number of ack retries have significantly
reduced.
pull/8479/head
Hasnain Virk 2018-09-20 14:54:54 +03:00 committed by adbridge
parent a1260998b4
commit cee09b6656
1 changed files with 2 additions and 1 deletions

View File

@ -576,7 +576,6 @@ void LoRaWANStack::process_transmission_timeout()
void LoRaWANStack::process_transmission(void)
{
tr_debug("Transmission completed");
_loramac.on_radio_tx_done(_tx_timestamp);
if (_device_current_state == DEVICE_STATE_JOINING) {
_device_current_state = DEVICE_STATE_AWAITING_JOIN_ACCEPT;
@ -588,6 +587,8 @@ void LoRaWANStack::process_transmission(void)
_device_current_state = DEVICE_STATE_AWAITING_ACK;
}
}
_loramac.on_radio_tx_done(_tx_timestamp);
}
void LoRaWANStack::post_process_tx_with_reception()