Stop transmitting (in a hackish way) when the TX is done.

This commit is contained in:
Stephen Olesen 2015-07-02 01:31:36 -06:00
parent 13be6810f1
commit 8e8c88f67c
1 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,14 @@ void loop() {
} }
// Wait 2 seconds before we send our beacon again. // Wait 2 seconds before we send our beacon again.
Serial.println("tick"); Serial.println("tick");
// Wait up to 2.5 seconds to finish sending, and stop transmitter.
// TODO: This is hackery.
for(int i = 0; i < 500; i++) {
if(!radio.afsk.isSending())
break;
delay(50);
}
radio.setModeReceive();
delay(2000); delay(2000);
} }