+ bag.add (frequencies, c);
+
+ // Telemetry format menu
+ telemetries = new JComboBox();
+ for (int i = 1; i <= Altos.ao_telemetry_max; i++)
+ telemetries.addItem(Altos.telemetry_name(i));
+ int telemetry = AltosPreferences.telemetry(serial);
+ if (telemetry <= Altos.ao_telemetry_off ||
+ telemetry > Altos.ao_telemetry_max)
+ 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;
+ reader.set_telemetry(telemetry);
+ reader.save_telemetry();
+ }
+ });
+ 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);