- 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);
+ 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));