Skip to content

Commit

Permalink
Update available() function again
Browse files Browse the repository at this point in the history
- Add return condition for DPL & 8-bit CRC length
  • Loading branch information
TMRh20 committed Jan 3, 2024
1 parent 03642c0 commit bd7a610
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/nrf_to_nrf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ bool nrf_to_nrf::available(uint8_t* pipe_num)
uint32_t counter = 0;
uint8_t tmpIV[CCM_IV_SIZE];
NRF_RADIO->EVENTS_CRCOK = 0;
if (DPL && radioData[0] > ACTUAL_MAX_PAYLOAD_SIZE - 4 && NRF_RADIO->CRCCNF != 0) {
if (DPL && radioData[0] > ACTUAL_MAX_PAYLOAD_SIZE - 4 && NRF_RADIO->CRCCNF == RADIO_CRCCNF_LEN_Two) {
NRF_RADIO->TASKS_START = 1;
return 0;
}else
if (DPL && radioData[0] > ACTUAL_MAX_PAYLOAD_SIZE - 3 && NRF_RADIO->CRCCNF == RADIO_CRCCNF_LEN_One) {
NRF_RADIO->TASKS_START = 1;
return 0;
}else
Expand Down

0 comments on commit bd7a610

Please sign in to comment.