From: Keith Packard Date: Thu, 17 Jun 2010 04:48:04 +0000 (-0700) Subject: ao-view: disable radio telemetry monitoring during channel change X-Git-Tag: debian/0.6+223+g5283451~6 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=50ae347bf9de49ccfc92d26888f36e155fb406a3 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 --- 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;