altoslib: Save eeprom data in new .eeprom format
[fw/altos] / altoslib / AltosEepromRecordGps.java
index d547ef02f04cb303f192d032e7c968656ebdfb7d..1312d3ecbd18fa6774f027cdae71528bfb11eae7 100644 (file)
@@ -145,9 +145,10 @@ public class AltosEepromRecordGps extends AltosEepromRecord {
        }
 
        public AltosEepromRecord next() {
-               if (start + length + length < eeprom.data.size())
-                       return new AltosEepromRecordGps(eeprom, start + length);
-               return null;
+               int     s = next_start();
+               if (s < 0)
+                       return null;
+               return new AltosEepromRecordGps(eeprom, s);
        }
 
        public AltosEepromRecordGps(AltosEepromNew eeprom, int start) {