Fixed a bug where it was writing to the wrong pipe
This commit is contained in:
parent
e7254a3b3a
commit
93f5cface0
|
@ -258,10 +258,10 @@ void loop(void)
|
||||||
radio.stopListening();
|
radio.stopListening();
|
||||||
|
|
||||||
// Open the correct pipe for writing
|
// 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
|
// 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.
|
// Send the final one back.
|
||||||
radio.write( &got_time, sizeof(unsigned long) );
|
radio.write( &got_time, sizeof(unsigned long) );
|
||||||
|
|
Loading…
Reference in New Issue