- c.gridx = 1;
- c.gridy = 0;
- c.weightx = 0;
- c.weighty = 0;
- c.fill = GridBagConstraints.NONE;
- c.anchor = GridBagConstraints.WEST;
- bag.add (telemetries, c);
- c.insets = new Insets(0, 0, 0, 0);
+ rates.setEnabled(reader.supports_telemetry_rate(AltosLib.ao_telemetry_rate_2400));
+ bag.add (rates, constraints(1, 1));
+
+ // Telemetry format list
+ if (reader.supports_telemetry(Altos.ao_telemetry_standard)) {
+ telemetries = new AltosUITelemetryList(serial);
+ telemetries.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ int telemetry = telemetries.get_selected();
+ reader.set_telemetry(telemetry);
+ reader.save_telemetry();
+ }
+ });
+ bag.add (telemetries, constraints(2, 1));
+ } else {
+ String version;
+
+ if (reader.supports_telemetry(Altos.ao_telemetry_0_9))
+ version = "Telemetry: 0.9";
+ else if (reader.supports_telemetry(Altos.ao_telemetry_0_8))
+ version = "Telemetry: 0.8";
+ else
+ version = "Telemetry: None";
+
+ telemetry = new JLabel(version);
+ bag.add (telemetry, constraints(2, 1));
+ }
+ next_row();