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,
}
public static void main(final String[] args) {
+ AltosDevice[] devices = AltosDeviceLinux.list();
+ for (int i = 0; i < devices.length; i++)
+ System.out.printf("Model: %s Serial: %d Tty: %s\n",
+ devices[i].product, devices[i].serial, devices[i].tty);
AltosUI altosui = new AltosUI();
altosui.setVisible(true);
}