diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-23 19:09:31 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-23 19:10:27 -0800 |
commit | f3233985a132e1d660e6df12d0056b6729f16faf (patch) | |
tree | c260b1ca00c3234a1649d24e624fcca0c7c46748 /ao-tools | |
parent | 6cd9be22f06f21d12ee2f668989d83d3c61d14c0 (diff) |
altosui: Disable radio configation over packet link.
Attempting to configure the radio over the packet link will only end
up confusing the user, so disable it. This also works around a bug in
older TM code which would lock up when trying to do this.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools')
-rw-r--r-- | ao-tools/altosui/AltosConfig.java | 8 | ||||
-rw-r--r-- | ao-tools/altosui/AltosConfigUI.java | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ao-tools/altosui/AltosConfig.java b/ao-tools/altosui/AltosConfig.java index 52dbfd79..b1acd410 100644 --- a/ao-tools/altosui/AltosConfig.java +++ b/ao-tools/altosui/AltosConfig.java @@ -149,7 +149,7 @@ public class AltosConfig implements Runnable, ActionListener { } void init_ui () throws InterruptedException, TimeoutException { - config_ui = new AltosConfigUI(owner); + config_ui = new AltosConfigUI(owner, remote); config_ui.addActionListener(this); set_ui(); } @@ -191,8 +191,10 @@ public class AltosConfig implements Runnable, ActionListener { start_serial(); serial_line.printf("c m %d\n", main_deploy.get()); serial_line.printf("c d %d\n", apogee_delay.get()); - serial_line.printf("c r %d\n", radio_channel.get()); - serial_line.printf("c f %d\n", radio_calibration.get()); + if (!remote) { + serial_line.printf("c r %d\n", radio_channel.get()); + serial_line.printf("c f %d\n", radio_calibration.get()); + } serial_line.printf("c c %s\n", callsign.get()); serial_line.printf("c w\n"); } catch (InterruptedException ie) { diff --git a/ao-tools/altosui/AltosConfigUI.java b/ao-tools/altosui/AltosConfigUI.java index ca89f58d..cfa5d7b9 100644 --- a/ao-tools/altosui/AltosConfigUI.java +++ b/ao-tools/altosui/AltosConfigUI.java @@ -98,7 +98,7 @@ public class AltosConfigUI } /* Build the UI using a grid bag */ - public AltosConfigUI(JFrame in_owner) { + public AltosConfigUI(JFrame in_owner, boolean remote) { super (in_owner, "Configure TeleMetrum", false); owner = in_owner; @@ -244,6 +244,8 @@ public class AltosConfigUI radio_channel_value = new JComboBox(radio_channel_values); radio_channel_value.setEditable(false); radio_channel_value.addItemListener(this); + if (remote) + radio_channel_value.setEnabled(false); pane.add(radio_channel_value, c); /* Radio Calibration */ @@ -267,6 +269,8 @@ public class AltosConfigUI c.ipady = 5; radio_calibration_value = new JTextField(String.format("%d", 1186611)); radio_calibration_value.getDocument().addDocumentListener(this); + if (remote) + radio_calibration_value.setEnabled(false); pane.add(radio_calibration_value, c); /* Callsign */ |