From 93f5cface0ebc0b82801ab7741b952578af37f7c Mon Sep 17 00:00:00 2001 From: maniacbug Date: Mon, 2 May 2011 21:21:10 -0700 Subject: [PATCH] Fixed a bug where it was writing to the wrong pipe --- examples/starping/starping.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/starping/starping.pde b/examples/starping/starping.pde index 828b07d..2100c31 100644 --- a/examples/starping/starping.pde +++ b/examples/starping/starping.pde @@ -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) );