From 50ae347bf9de49ccfc92d26888f36e155fb406a3 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 16 Jun 2010 21:48:04 -0700 Subject: [PATCH 1/1] ao-view: disable radio telemetry monitoring during channel change This makes ao-view disable the radio so that the channel change has an immediate effect rather than waiting for a packet on the old channel. Note that this should also be fixed in the TM code itself so that this change wouldn't be required. Signed-off-by: Keith Packard --- ao-tools/ao-view/aoview_monitor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ao-tools/ao-view/aoview_monitor.c b/ao-tools/ao-view/aoview_monitor.c index 4d7e7a9f..1f9937b2 100644 --- a/ao-tools/ao-view/aoview_monitor.c +++ b/ao-tools/ao-view/aoview_monitor.c @@ -83,8 +83,11 @@ aoview_monitor_callback(gpointer user_data, void aoview_monitor_set_channel(int channel) { - if (monitor_serial) + if (monitor_serial) { + aoview_serial_printf(monitor_serial, "m 0\n"); aoview_serial_printf(monitor_serial, "c r %d\n", channel); + aoview_serial_printf(monitor_serial, "m 1\n"); + } } gboolean @@ -98,9 +101,7 @@ aoview_monitor_connect(char *tty) aoview_table_clear(); aoview_state_reset(); channel = aoview_channel_current(); - if (channel >= 0) - aoview_monitor_set_channel(channel); - aoview_serial_printf(monitor_serial, "m 1\n"); + aoview_monitor_set_channel(channel); aoview_serial_set_callback(monitor_serial, aoview_monitor_callback); return TRUE; -- 2.30.2