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;
c.gridy = 0;
+ c.weightx = 0;
+ c.weighty = 0;
c.insets = new Insets(3, 3, 3, 3);
+ c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.WEST;
bag.add (frequencies, c);
telemetry = Altos.ao_telemetry_standard;
telemetries.setSelectedIndex(telemetry - 1);
telemetries.setMaximumRowCount(Altos.ao_telemetry_max);
+ telemetries.setPreferredSize(null);
+ telemetries.revalidate();
telemetries.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int telemetry = telemetries.getSelectedIndex() + 1;
});
c.gridx = 1;
c.gridy = 0;
+ c.weightx = 0;
+ c.weighty = 0;
c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.WEST;
bag.add (telemetries, c);
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;