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 628b6e6733ba480c0099a2fbbb9566cd48d6b239..f2f3fc2e39650b98482dd44eff84f11881db3bbe 100644 (file)
@@ -80,7 +80,8 @@ ao_set_monitor(uint8_t monitoring)
 {
        ao_monitoring = monitoring;
        ao_wakeup(&ao_monitoring);
 {
        ao_monitoring = monitoring;
        ao_wakeup(&ao_monitoring);
-       ao_radio_abort();
+       if (!ao_monitoring)
+               ao_radio_abort();
 }
 
 static void
 }
 
 static void