summaryrefslogtreecommitdiff
path: root/ao-tools/ao-view
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-06-16 21:48:04 -0700
committerKeith Packard <keithp@keithp.com>2010-06-16 21:48:04 -0700
commit50ae347bf9de49ccfc92d26888f36e155fb406a3 (patch)
tree11fd9ad2ed0f760a2a18921cec6283ba73d4a09e /ao-tools/ao-view
parent563a9dcdfef42718370c49f16cc2271642b3e055 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-view')
-rw-r--r--ao-tools/ao-view/aoview_monitor.c9
1 files 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;