Skip to content

Commit

Permalink
Merge pull request #18 from tobigun/static-payload-with-no-ack-does-n…
Browse files Browse the repository at this point in the history
…ot-have-packet-counter

Static payload with no ack does not have packet counter
  • Loading branch information
TMRh20 authored Mar 13, 2024
2 parents bd77971 + df2fd4b commit 29b8745
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/nrf_to_nrf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,17 @@ bool nrf_to_nrf::available(uint8_t* pipe_num)
}
NRF_RADIO->TXADDRESS = txAddress;
startListening(false);
}

// If the packet has the same ID number and data, it is most likely a
// duplicate
if(NRF_RADIO->CRCCNF != 0){ //If CRC enabled, check this data
if (packetCtr == lastPacketCounter && packetData == lastData) {
NRF_RADIO->TASKS_START = 1;
return 0;
}
// If the packet has the same ID number and data, it is most likely a
// duplicate
if(NRF_RADIO->CRCCNF != 0) { //If CRC enabled, check this data
if (packetCtr == lastPacketCounter && packetData == lastData) {
NRF_RADIO->TASKS_START = 1;
return 0;
}
}
}

#if defined CCM_ENCRYPTION_ENABLED
if (enableEncryption) {
ccmData.counter = counter;
Expand Down

0 comments on commit 29b8745

Please sign in to comment.