altoslib: Handle eeprom tick wrapping
[fw/altos] / altoslib / AltosEepromRecordSet.java
index 183cb9aecc0f4deca8cd269d40d01df6a8639324..c019a092bbeb0c44d3652e1768e8fbea6de50c09 100644 (file)
@@ -33,6 +33,7 @@ public class AltosEepromRecordSet implements AltosRecordSet {
                                if (record.cmd() == AltosLib.AO_LOG_FLIGHT) {
                                        cal_data.set_tick(record.tick());
                                        cal_data.set_boost_tick();
+                                       break;
                                }
                        }
                }
@@ -110,7 +111,7 @@ public class AltosEepromRecordSet implements AltosRecordSet {
                }
        }
 
-       public AltosEepromRecordSet(Reader input) throws IOException {
+       public AltosEepromRecordSet(InputStream input) throws IOException {
                this(new AltosEepromNew(input));
        }
 }