Skip to content

Commit

Permalink
Fix: Removed wrong flush() on RPi
Browse files Browse the repository at this point in the history
Removed the wrong rx_flush() on RPi code after testing - caused strange
behaviour in some cases
Corrected failureDetect variable
  • Loading branch information
TMRh20 committed Aug 6, 2014
1 parent e8a63c0 commit 589b2c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RPi/RF24/RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ bool RF24::begin(void)
setChannel(76);

// Flush buffers
//flush_rx();
flush_rx();
flush_tx();

powerUp();
Expand Down Expand Up @@ -528,7 +528,7 @@ void RF24::stopListening(void)
{
bcm2835_gpio_write(ce_pin, LOW);
flush_tx();
flush_rx();
//flush_rx();
delayMicroseconds(150);
write_register(CONFIG, ( read_register(CONFIG) ) & ~_BV(PRIM_RX) );
delayMicroseconds(150);
Expand Down Expand Up @@ -561,7 +561,7 @@ void RF24::powerUp(void)
#if defined (FAILURE_HANDLING)
void RF24::errNotify(){
if(debug){ printf("HARDWARE FAIL\n\r"); }
failureDetect = true;
failureDetected = true;
}
#endif
/******************************************************************/
Expand Down

0 comments on commit 589b2c7

Please sign in to comment.