+ bag.add (frequencies, constraints(0, 1));
+
+ // Telemetry rate list
+ rates = new AltosUIRateList(AltosUIPreferences.telemetry_rate(serial));
+ rates.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ int rate = rates.rate();
+ try {
+ reader.set_telemetry_rate(rate);
+ } catch (TimeoutException te) {
+ } catch (InterruptedException ie) {
+ }
+ reader.save_telemetry_rate();
+ }
+ });
+ 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();