altos: Interrupt radio receive when changing data rate
authorKeith Packard <keithp@keithp.com>
Mon, 14 Jul 2014 03:42:41 +0000 (20:42 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 14 Jul 2014 03:42:41 +0000 (20:42 -0700)
This aborts any pending radio receive when changing the data rate so
that the radio can be reprogrammed to receive at the correct rate.

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

index 32a0967c9808c7dcd4087b76c58178630baa30c2..d73a3733db1989bb95dbd1386d67114048c0ba76 100644 (file)
@@ -518,6 +518,9 @@ ao_config_radio_rate_set(void) __reentrant
        ao_telemetry_reset_interval();
 #endif
        _ao_config_edit_finish();
+#if HAS_RADIO_RECV
+       ao_radio_recv_abort();
+#endif
 }
 #endif