Normally, the replay process makes one final report after the file has
been parsed. However, if the reading process is interrupted to display
something else, this report is just annoying, so don't make it.
Signed-off-by: Keith Packard <keithp@keithp.com>
AltosRecord read() throws InterruptedException, ParseException, AltosCRCException, IOException { return null; }
AltosRecord read() throws InterruptedException, ParseException, AltosCRCException, IOException { return null; }
+ void close(boolean interrupted) { }
void update(AltosState state) throws InterruptedException { }
public void run() {
void update(AltosState state) throws InterruptedException { }
public void run() {
+ boolean interrupted = false;
String line;
AltosState state = null;
AltosState old_state = null;
String line;
AltosState state = null;
AltosState old_state = null;
}
}
} catch (InterruptedException ee) {
}
}
} catch (InterruptedException ee) {
} catch (IOException ie) {
JOptionPane.showMessageDialog(AltosUI.this,
String.format("Error reading from \"%s\"", name),
"Telemetry Read Error",
JOptionPane.ERROR_MESSAGE);
} finally {
} catch (IOException ie) {
JOptionPane.showMessageDialog(AltosUI.this,
String.format("Error reading from \"%s\"", name),
"Telemetry Read Error",
JOptionPane.ERROR_MESSAGE);
} finally {
+ try {
+ idle_thread.join();
+ } catch (InterruptedException ie) {}
return new AltosTelemetry(l.line);
}
return new AltosTelemetry(l.line);
}
+ void close(boolean interrupted) {
serial.close();
serial.remove_monitor(telem);
}
serial.close();
serial.remove_monitor(telem);
}
- public void close () {
- report();
+ public void close (boolean interrupted) {
+ if (!interrupted)
+ report();
}
public ReplayThread(AltosReader in_reader, String in_name) {
}
public ReplayThread(AltosReader in_reader, String in_name) {