maniacbug/RF24 — Issue #3: RF24::write(
Author: mas2227
Created: 2011-12-31 05:56:01+00:00
State: open

R24.cpp R24::write() the line:
status = read_register(OBSERVE_TX,&observe_tx,1);
should be:
status = read_register(STATUS);
because your registry status bits gert used on the status:
while( ! ( status & ( _BV(TX_DS) | _BV(MAX_RT) ) ) && ( millis() - sent_at < timeout ) );
RF24::whatHappened():
uint8_t status = write_register(STATUS,_BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT) );
should be:
uint8_t status = read_register(STATUS);
and reset after:
// Report to the user what happened
tx_ok = status & _BV(TX_DS);
tx_fail = status & _BV(MAX_RT);
rx_ready = status & _BV(RX_DR);
status = write_register(STATUS, _BV(TX_DS) | _BV(MAX_RT) );
return;

Michael Spohnholtz

ps great work,just stated learning arduino and r24 has been a great learning project! thanks! You live in my part of the woods, i live in lynnwood wa... small world.