Commit 8814d39c authored by TMRh20's avatar TMRh20

Incr delay in stopListening(); Fix transfer example

- Testing with Arduino & RPi indicates delay needs to be increased
slightly before flushing tx_fifo
- Fix addresses in RPi transfer example, and add stopListening()
parent eabd46ae
......@@ -757,7 +757,7 @@ void RF24::stopListening(void)
delayMicroseconds(230);
if(read_register(FEATURE) & _BV(EN_ACK_PAY)){
delayMicroseconds(170);
delayMicroseconds(200);
flush_tx();
}
//flush_rx();
......
......@@ -83,11 +83,12 @@ int main(int argc, char** argv){
/***********************************/
if ( role == role_ping_out ) {
radio.openWritingPipe(addresses[0]);
radio.openReadingPipe(1,addresses[1]);
} else {
radio.openWritingPipe(addresses[1]);
radio.openReadingPipe(1,addresses[0]);
radio.stopListening();
} else {
radio.openWritingPipe(addresses[0]);
radio.openReadingPipe(1,addresses[1]);
radio.startListening();
}
......@@ -113,6 +114,7 @@ int main(int argc, char** argv){
if(!radio.writeFast(&data,32)){ //Write to the FIFO buffers
counter++; //Keep count of failed payloads
}
//This is only required when NO ACK ( enableAutoAck(0) ) payloads are used
/* if(millis() - pauseTime > 3){ // Need to drop out of TX mode every 4ms if sending a steady stream of multicast data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment