Skip to content

Commit

Permalink
Static payload with no ack does not have packet counter
Browse files Browse the repository at this point in the history
  • Loading branch information
tobigun committed Mar 11, 2024
1 parent 924dff5 commit df2fd4b
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 @@ -272,16 +272,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 df2fd4b

Please sign in to comment.