diff options
author | Keith Packard <keithp@keithp.com> | 2013-02-10 14:17:04 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-02-10 14:17:04 -0800 |
commit | c2701ae646124f0668c5f2d1df3fc80f0075a9d7 (patch) | |
tree | 6b29d8d8f76ed58b13cd3d0796fcca5889731767 /altosui/AltosIdleMonitorUI.java | |
parent | cc0ea39fee73417ecd69c020d9eca723ebb2cf65 (diff) |
altosui: Interrupt MonitorIdle when changing frequency/callsign
When switching radio parameters, the local device needs to have the
parameters switched, so interrupt the current operation and start
over, the frequency and callsign will be set the next time through.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosIdleMonitorUI.java')
-rw-r--r-- | altosui/AltosIdleMonitorUI.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index 462bff18..8c883eeb 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -37,11 +37,8 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl boolean remote; void stop_display() { - if (thread != null && thread.isAlive()) { - thread.interrupt(); - try { - thread.join(); - } catch (InterruptedException ie) {} + if (thread != null) { + thread.abort(); } thread = null; } @@ -92,8 +89,11 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl /* DocumentListener interface methods */ public void changedUpdate(DocumentEvent e) { - if (callsign_value != null) - AltosUIPreferences.set_callsign(callsign_value.getText()); + if (callsign_value != null) { + String callsign = callsign_value.getText(); + thread.set_callsign(callsign); + AltosUIPreferences.set_callsign(callsign); + } } public void insertUpdate(DocumentEvent e) { |