Signed-off-by: Keith Packard <keithp@keithp.com>
try {
if (state.state > AltosTelemetry.ao_flight_pad)
Thread.sleep((int) (state.time_change * 1000));
try {
if (state.state > AltosTelemetry.ao_flight_pad)
Thread.sleep((int) (state.time_change * 1000));
- } catch (InterruptedException e) {}
+ } catch (InterruptedException e) {
+ break;
+ }
} catch (ParseException pp) {
JOptionPane.showMessageDialog(AltosUI.this,
line,
} catch (ParseException pp) {
JOptionPane.showMessageDialog(AltosUI.this,
line,
+ ReplayThread replay_thread;
/*
* Replay a flight from telemetry data
*/
/*
* Replay a flight from telemetry data
*/
try {
FileInputStream replay = new FileInputStream(file);
ReplayThread thread = new ReplayThread(replay, filename);
try {
FileInputStream replay = new FileInputStream(file);
ReplayThread thread = new ReplayThread(replay, filename);
+ if (thread != null && replay_thread != null && replay_thread.isAlive())
+ replay_thread.interrupt();
+ replay_thread = thread;
+ replay_thread.start();
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
filename,
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
filename,