altoslib: Fix parsing of old TM log GPS sat data
authorKeith Packard <keithp@keithp.com>
Mon, 28 Aug 2017 00:34:49 +0000 (17:34 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 28 Aug 2017 00:40:53 +0000 (17:40 -0700)
Attempting to fetch sat data from wrong byte led to array bounds
exception.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosEepromRecordFull.java

index 85709f734de157ac9ff23b9f753c62651b4d131b..32df957841e19e978cc8c2892b9bda7a856de535 100644 (file)
@@ -85,7 +85,7 @@ public class AltosEepromRecordFull extends AltosEepromRecord {
                case AltosLib.AO_LOG_GPS_SAT:
                        gps = cal_data.make_temp_gps(tick(),true);
                        int svid = data16(0);
-                       int c_n0 = data16(3);
+                       int c_n0 = data16(2);
                        gps.add_sat(svid, c_n0);
                        break;
                case AltosLib.AO_LOG_GPS_DATE: