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
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 {
} catch (InterruptedException ie) {
} catch (IOException ie) {
}
- try {
- close();
- } catch (IOException ie) {
- }
+ close();
}
public AltosLog (AltosSerial s) {