return start - o.start;
}
- public void update_state(AltosState state) {
+ public void update_state(AltosFlightListener state) {
super.update_state(state);
AltosGPS gps;
/* Flush any pending RecordGps changes */
- if (state.gps_pending) {
+ if (state.gps_pending()) {
switch (cmd()) {
case AltosLib.AO_LOG_GPS_LAT:
case AltosLib.AO_LOG_GPS_LON:
switch (cmd()) {
case AltosLib.AO_LOG_FLIGHT:
- if (state.flight == AltosLib.MISSING) {
+ if (state.flight() == AltosLib.MISSING) {
state.set_boost_tick(tick());
state.set_flight(flight());
}
}
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) {