diff options
author | Keith Packard <keithp@keithp.com> | 2011-11-12 18:44:36 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-11-12 18:44:36 -0800 |
commit | 5972c642f0de0789e90268bfa19ef8b51c06eebc (patch) | |
tree | 5a586d149629d5e07bd0f682e4ce0c001367a96d /src/cc1111/ao_radio.c | |
parent | ef7f86453d686a49882e8c1b88a59228c4c631a9 (diff) |
altos: Handle internal and external telem monitoring requests
Record separate internal vs external monitoring state, allowing
both to happen at the same time, and when either is turned off, the
other keeps working.
This also adds disable/enable so that other radio users can
temporarily take over the radio; monitoring will resume when the other
radio user is finished.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/cc1111/ao_radio.c')
-rw-r--r-- | src/cc1111/ao_radio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cc1111/ao_radio.c b/src/cc1111/ao_radio.c index 75f241d4..ee506f89 100644 --- a/src/cc1111/ao_radio.c +++ b/src/cc1111/ao_radio.c @@ -421,7 +421,7 @@ ao_radio_test(void) mode++; if ((mode & 2) && !radio_on) { #if HAS_MONITOR - ao_set_monitor(0); + ao_monitor_disable(); #endif #if PACKET_HAS_SLAVE ao_packet_slave_stop(); @@ -439,6 +439,9 @@ ao_radio_test(void) ao_radio_idle(); ao_radio_put(); radio_on = 0; +#if HAS_MONITOR + ao_monitor_enable(); +#endif } } |