Don't abort the radio when enabling telemetry monitoring
authorKeith Packard <keithp@keithp.com>
Mon, 5 Apr 2010 02:54:46 +0000 (19:54 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 5 Apr 2010 02:54:46 +0000 (19:54 -0700)
If telemetry monitoring is already on, then there isn't any point, and
if it's not on, then presumably there isn't any radio work to abort.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao_monitor.c

index 628b6e6..f2f3fc2 100644 (file)
@@ -80,7 +80,8 @@ ao_set_monitor(uint8_t monitoring)
 {
        ao_monitoring = monitoring;
        ao_wakeup(&ao_monitoring);
-       ao_radio_abort();
+       if (!ao_monitoring)
+               ao_radio_abort();
 }
 
 static void