summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosLog.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-11-05 23:44:47 -0700
committerKeith Packard <keithp@keithp.com>2010-11-05 23:44:47 -0700
commit474b8bd5b68e74757d8c99577d874f0aad49142d (patch)
treef863a72a129a691c4e26c6e9478e275f2a227d0c /ao-tools/altosui/AltosLog.java
parent799361921d4f0351b1f93aa70ea3f378b2423409 (diff)
altosui: Split out flight monitoring to separate window
This creates a per-TD (or replay) window to contain the flight monitoring information, allowing multiple monitors. This also adds per-TD preferences for monitoring channel. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosLog.java')
-rw-r--r--ao-tools/altosui/AltosLog.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/ao-tools/altosui/AltosLog.java b/ao-tools/altosui/AltosLog.java
index f876beba..fed96c28 100644
--- a/ao-tools/altosui/AltosLog.java
+++ b/ao-tools/altosui/AltosLog.java
@@ -39,9 +39,15 @@ class AltosLog implements Runnable {
FileWriter log_file;
Thread log_thread;
- void close() throws IOException {
- if (log_file != null)
- log_file.close();
+ void close() {
+ if (log_file != null) {
+ try {
+ log_file.close();
+ } catch (IOException io) {
+ }
+ }
+ if (log_thread != null)
+ log_thread.interrupt();
}
boolean open (AltosTelemetry telem) throws IOException {
@@ -89,10 +95,7 @@ class AltosLog implements Runnable {
} catch (InterruptedException ie) {
} catch (IOException ie) {
}
- try {
- close();
- } catch (IOException ie) {
- }
+ close();
}
public AltosLog (AltosSerial s) {