altosui: Off-by-one error in telemetry format configuration UI
authorKeith Packard <keithp@keithp.com>
Sun, 27 Mar 2011 07:12:01 +0000 (00:12 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 27 Mar 2011 07:12:01 +0000 (00:12 -0700)
The telemetry format menu uses 0 for full and 1 for tiny, but the
telemetry configuration uses 1 for full and 2 for tiny. One direction
(config to UI) was right, the other (UI to config) was wrong.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosFlightUI.java

index 286b2a4eeb3519e19a8fdfecfdb167b8e3cc5b80..66dcdad57863f8942a49d2fc3d87ea3834ab5d48 100644 (file)
@@ -162,7 +162,7 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
                        telemetries.setMaximumRowCount(2);
                        telemetries.addActionListener(new ActionListener() {
                                        public void actionPerformed(ActionEvent e) {
-                                               int telemetry = telemetries.getSelectedIndex();
+                                               int telemetry = telemetries.getSelectedIndex() + 1;
                                                reader.set_telemetry(telemetry);
                                        }
                                });