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