projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: add reboot button to telemetrum configuration UI
[fw/altos]
/
ao-tools
/
altosui
/
AltosLog.java
diff --git
a/ao-tools/altosui/AltosLog.java
b/ao-tools/altosui/AltosLog.java
index f876bebae9166c1b205f36ce55f926f3a956d714..137147d5cc1aa2079c66ef1cf7d865a0cf2e3965 100644
(file)
--- a/
ao-tools/altosui/AltosLog.java
+++ b/
ao-tools/altosui/AltosLog.java
@@
-22,9
+22,6
@@
import java.lang.*;
import java.util.*;
import java.text.ParseException;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.*;
import java.text.ParseException;
import java.util.concurrent.LinkedBlockingQueue;
-import altosui.AltosSerial;
-import altosui.AltosFile;
-import altosui.AltosLine;
/*
* This creates a thread to capture telemetry data and write it to
/*
* This creates a thread to capture telemetry data and write it to
@@
-39,9
+36,15
@@
class AltosLog implements Runnable {
FileWriter log_file;
Thread log_thread;
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 {
}
boolean open (AltosTelemetry telem) throws IOException {
@@
-89,10
+92,7
@@
class AltosLog implements Runnable {
} catch (InterruptedException ie) {
} catch (IOException ie) {
}
} catch (InterruptedException ie) {
} catch (IOException ie) {
}
- try {
- close();
- } catch (IOException ie) {
- }
+ close();
}
public AltosLog (AltosSerial s) {
}
public AltosLog (AltosSerial s) {