NRF5 ESB fix two states (#996)

This commit is contained in:
d00616
2017-11-19 13:48:29 +01:00
committed by Henrik Ekblad
parent aabddc841c
commit e39b2be7af
+4 -5
View File
@@ -1,7 +1,7 @@
/** /**
* The MySensors Arduino library handles the wireless radio link and protocol * The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice. * between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each * The sensors formrs a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of * repeater and gateway builds a routing tables in EEPROM which keeps track of
* the * the
* network topology allowing messages to be routed to nodes. * network topology allowing messages to be routed to nodes.
@@ -636,10 +636,6 @@ extern "C" {
(NRF_RADIO->STATE == RADIO_STATE_STATE_RxIdle) or (NRF_RADIO->STATE == RADIO_STATE_STATE_RxIdle) or
(NRF_RADIO->STATE == RADIO_STATE_STATE_RxDisable) or (NRF_RADIO->STATE == RADIO_STATE_STATE_RxDisable) or
(NRF_RADIO->STATE == RADIO_STATE_STATE_TxRu)) { (NRF_RADIO->STATE == RADIO_STATE_STATE_TxRu)) {
#ifdef NRF52
// RX end, stop timer (PAN102)
_stopTimer();
#endif
if (NRF_RADIO->CRCSTATUS) { if (NRF_RADIO->CRCSTATUS) {
// Ensure no ACK package is recieved // Ensure no ACK package is recieved
if (NRF_RADIO->RXMATCH != NRF5_ESB_TX_ADDR) { if (NRF_RADIO->RXMATCH != NRF5_ESB_TX_ADDR) {
@@ -664,8 +660,11 @@ extern "C" {
rx_buffer.noack = 0; rx_buffer.noack = 0;
#endif #endif
} else { } else {
// Buffer is full
// Stop ACK // Stop ACK
_stopACK(); _stopACK();
// Increment pkgid allowing receive the package again
package_ids[NRF_RADIO->RXMATCH]++;
} }
} }
} else { } else {