Skip to content

Commit

Permalink
Fixed a bug where it was writing to the wrong pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
maniacbug committed May 3, 2011
1 parent e7254a3 commit 93f5cfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/starping/starping.pde
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ void loop(void)
radio.stopListening();

// Open the correct pipe for writing
radio.openWritingPipe(listening_pipes[pipe_num]);
radio.openWritingPipe(listening_pipes[pipe_num-1]);

// Retain the low 2 bytes to identify the pipe for the spew
uint16_t pipe_id = listening_pipes[pipe_num] & 0xffff;
uint16_t pipe_id = listening_pipes[pipe_num-1] & 0xffff;

// Send the final one back.
radio.write( &got_time, sizeof(unsigned long) );
Expand Down

0 comments on commit 93f5cfa

Please sign in to comment.