From 8e8c88f67c14c17bba6af6ed3267d2e3c341f2a9 Mon Sep 17 00:00:00 2001 From: Stephen Olesen Date: Thu, 2 Jul 2015 01:31:36 -0600 Subject: [PATCH] Stop transmitting (in a hackish way) when the TX is done. --- examples/AFSK-Send/AFSK-Send.ino | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/AFSK-Send/AFSK-Send.ino b/examples/AFSK-Send/AFSK-Send.ino index 7f7282a..9b15847 100644 --- a/examples/AFSK-Send/AFSK-Send.ino +++ b/examples/AFSK-Send/AFSK-Send.ino @@ -58,6 +58,14 @@ void loop() { } // Wait 2 seconds before we send our beacon again. 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); }