Skip to content

Commit

Permalink
Add radio sending retries. Needed now that RF24 doesn't have them
Browse files Browse the repository at this point in the history
  • Loading branch information
maniacbug committed Aug 23, 2013
1 parent 5953473 commit 7d4b5b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion RF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d4b5b1

Please sign in to comment.