From 5972c642f0de0789e90268bfa19ef8b51c06eebc Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 12 Nov 2011 18:44:36 -0800 Subject: 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 --- src/cc1111/ao_packet_master.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/cc1111/ao_packet_master.c') diff --git a/src/cc1111/ao_packet_master.c b/src/cc1111/ao_packet_master.c index ab19f979..66f94288 100644 --- a/src/cc1111/ao_packet_master.c +++ b/src/cc1111/ao_packet_master.c @@ -114,7 +114,7 @@ ao_packet_forward(void) __reentrant flush(); #if HAS_MONITOR - ao_set_monitor(0); + ao_monitor_disable(); #endif ao_add_task(&ao_packet_task, ao_packet_master, "master"); ao_add_task(&ao_packet_echo_task, ao_packet_echo, "echo"); @@ -132,6 +132,9 @@ ao_packet_forward(void) __reentrant ao_wakeup(&ao_stdin_ready); ao_delay(AO_MS_TO_TICKS(10)); } +#if HAS_MONITOR + ao_monitor_enable(); +#endif } -- cgit v1.2.3