From d28323aadca8fa626315a9748c370d7e5a05dc64 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Sun, 6 Apr 2014 08:49:35 -0600 Subject: [PATCH] Fix: Missing byte with due RX - SPI transfer fix to read every available byte in the payload with payloads less than 32 bytes with dynamic payload size disabled. --- RF24.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RF24.cpp b/RF24.cpp index 5297c63..a2a501f 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -206,7 +206,7 @@ uint8_t RF24::read_payload(void* buf, uint8_t len) } *current++ = SPI.transfer(csn_pin,0xff); }else{ - while ( data_len-- > 1 ){ + while ( data_len-- ){ *current++ = SPI.transfer(csn_pin,0xff, SPI_CONTINUE); }