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,
}
}
+ ReplayThread replay_thread;
/*
* Replay a flight from telemetry data
*/
try {
FileInputStream replay = new FileInputStream(file);
ReplayThread thread = new ReplayThread(replay, filename);
- thread.start();
+ 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,