From bd7a6109850c5c937c863f77d626fc89aa2bfe81 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Wed, 3 Jan 2024 05:42:21 -0600 Subject: [PATCH] Update available() function again - Add return condition for DPL & 8-bit CRC length --- src/nrf_to_nrf.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nrf_to_nrf.cpp b/src/nrf_to_nrf.cpp index 2e6845c..ffd3a72 100644 --- a/src/nrf_to_nrf.cpp +++ b/src/nrf_to_nrf.cpp @@ -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