Skip to content

Commit 9de7fdd

Browse files
authored
Fix for Dynamic Payloads causing apparent Radio Failures (#1036)
- The rx buffer also needs to be flushed if R_RX_PL_WID returns 0 - No need for the delay nRF24/RF24Network#249
1 parent 69e2c4b commit 9de7fdd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

RF24.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,9 +1505,8 @@ uint8_t RF24::getDynamicPayloadSize(void)
15051505
{
15061506
uint8_t result = read_register(R_RX_PL_WID);
15071507

1508-
if (result > 32) {
1508+
if (result > 32 || !result) {
15091509
flush_rx();
1510-
delay(2);
15111510
return 0;
15121511
}
15131512
return result;

0 commit comments

Comments
 (0)