From df328408f79962adaed44194fef99e4c7426f41c Mon Sep 17 00:00:00 2001 From: maniacbug Date: Tue, 2 Aug 2011 15:24:19 -0700 Subject: [PATCH] Fix bugs. Ack payload available was broken since interrupts went in. stREtries was missing since the gcopeland merge. --- RF24.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/RF24.cpp b/RF24.cpp index dc3e2a5..750f82b 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -457,7 +457,7 @@ bool RF24::write( const void* buf, uint8_t len ) // * The send was successful (TX_DS) // * The send failed, too many retries (MAX_RT) // * There is an ack packet waiting (RX_DR) - bool tx_ok, tx_fail, ack_payload_available; + bool tx_ok, tx_fail; whatHappened(tx_ok,tx_fail,ack_payload_available); result = tx_ok; @@ -928,5 +928,12 @@ void RF24::disableCRC( void ) uint8_t disable = read_register(CONFIG) & ~_BV(EN_CRC) ; write_register( CONFIG, disable ) ; } + +/****************************************************************************/ +void RF24::setRetries(uint8_t delay, uint8_t count) +{ + write_register(SETUP_RETR,(delay&0xf)<