* General Public License for more details.
*/
-package org.altusmetrum.altoslib_11;
+package org.altusmetrum.altoslib_12;
public abstract class AltosEepromRecord implements Comparable<AltosEepromRecord> {
- AltosEepromNew eeprom;
+ AltosEeprom eeprom;
int wide_tick;
if (cmd_diff != 0)
return cmd_diff;
- int tick_diff = tick() - o.tick();
+ int tick_diff = wide_tick - o.wide_tick;
if (tick_diff != 0)
return tick_diff;
if (cmd() == AltosLib.AO_LOG_FLIGHT)
cal_data.set_boost_tick();
listener.set_time(cal_data.time());
+
+ /* Flush any pending GPS changes */
+ if (!AltosLib.is_gps_cmd(cmd())) {
+ AltosGPS gps = cal_data.temp_gps();
+ if (gps != null) {
+ listener.set_gps(gps);
+ cal_data.reset_temp_gps();
+ }
+ }
}
public int next_start() {
int s = start + length;
- while (s + length < eeprom.data.size()) {
+ while (s + length <= eeprom.data.size()) {
if (valid(s))
return s;
s += length;
public abstract AltosEepromRecord next();
- public AltosEepromRecord(AltosEepromNew eeprom, int start, int length) {
+ public AltosEepromRecord(AltosEeprom eeprom, int start, int length) {
this.eeprom = eeprom;
this.start = start;
this.length = length;