From 7d4b5b195684a607c4676aea31614dc5c66eb657 Mon Sep 17 00:00:00 2001 From: maniacbug Date: Fri, 23 Aug 2013 06:31:16 -0700 Subject: [PATCH] Add radio sending retries. Needed now that RF24 doesn't have them --- RF24Network.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index 8c6ccc17..e51e0901 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -253,7 +253,12 @@ bool RF24Network::write(uint16_t to_node) radio.stopListening(); // Put the frame on the pipe - ok = write_to_pipe( send_node, send_pipe ); + int retries = 3; + do + { + ok = write_to_pipe( send_node, send_pipe ); + } + while (!ok && retries--); // NOT NEEDED anymore. Now all reading pipes are open to start. #if 0