From: Keith Packard Date: Sun, 27 Mar 2011 07:12:01 +0000 (-0700) Subject: altosui: Off-by-one error in telemetry format configuration UI X-Git-Tag: 0.9.3~96 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=91a75279b6d306ba9d068a28c64917d5312122e8 altosui: Off-by-one error in telemetry format configuration UI 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 --- diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index 286b2a4e..66dcdad5 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -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); } });