summaryrefslogtreecommitdiff
path: root/src/ao_radio.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-11 16:11:34 -0700
committerKeith Packard <keithp@keithp.com>2011-08-11 16:11:34 -0700
commit640422c028a2be898aa3a9048a0f6fad2e43dd8d (patch)
tree38c0239bd28dbdeb50ed3d30c3f645a832ec8b22 /src/ao_radio.c
parent1d13460412046c53f36466193329caaa657bb278 (diff)
altos: remove monitor disable stubs from altimeter code
Monitor mode in the ground-station boards must be disabled when the radio is going to be used for another purpose, or the radio parameters changed. That places monitor-mode disable calls in other parts of the system which are shared with the altimeter code. Elide the ao_set_monitor calls for builds which do not include any monitoring code. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_radio.c')
-rw-r--r--src/ao_radio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ao_radio.c b/src/ao_radio.c
index 1fb0eea6..00816b33 100644
--- a/src/ao_radio.c
+++ b/src/ao_radio.c
@@ -432,7 +432,9 @@ ao_radio_test(void)
}
mode++;
if ((mode & 2) && !radio_on) {
+#if HAS_MONITOR
ao_set_monitor(0);
+#endif
#if PACKET_HAS_SLAVE
ao_packet_slave_stop();
#endif