AltosAscent ascent;
AltosDescent descent;
AltosLanded landed;
+ AltosCompanionInfo companion;
AltosSiteMap sitemap;
boolean has_map;
+ boolean has_companion;
private AltosFlightStatus flightStatus;
private AltosInfoTable flightInfo;
}
flightStatus.show(state, crc_errors);
flightInfo.show(state, crc_errors);
- if (state.gps != null) {
+
+ if (state.data.companion != null) {
+ if (!has_companion) {
+ pane.add("Companion", companion);
+ has_companion= true;
+ }
+ companion.show(state, crc_errors);
+ } else {
+ if (has_companion) {
+ pane.remove(companion);
+ has_companion = false;
+ }
+ }
+ if (state.gps != null && state.gps.connected) {
if (!has_map) {
pane.add("Site Map", sitemap);
has_map = true;
frequencies.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
double frequency = frequencies.frequency();
- reader.save_frequency();
try {
reader.set_frequency(frequency);
} catch (TimeoutException te) {
} catch (InterruptedException ie) {
}
+ reader.save_frequency();
}
});
c.gridx = 0;
descent = new AltosDescent();
pane.add("Descent", descent);
- landed = new AltosLanded();
+ landed = new AltosLanded(reader);
pane.add("Landed", landed);
flightInfo = new AltosInfoTable();
pane.add("Table", new JScrollPane(flightInfo));
+ companion = new AltosCompanionInfo();
+ has_companion = false;
+
sitemap = new AltosSiteMap();
has_map = false;