X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosEepromRecord.java;h=094584fecf8176668b1f239daca1a1520d8ff3b2;hp=7dd3759233d888b12a989e5c8bd9cc4761fe35c8;hb=dd72c9144b207b12150eb6a7ffb012f217f37374;hpb=222158581887b5f9e8b9843d14321c313fa023fa diff --git a/altoslib/AltosEepromRecord.java b/altoslib/AltosEepromRecord.java index 7dd37592..094584fe 100644 --- a/altoslib/AltosEepromRecord.java +++ b/altoslib/AltosEepromRecord.java @@ -12,11 +12,11 @@ * General Public License for more details. */ -package org.altusmetrum.altoslib_11; +package org.altusmetrum.altoslib_12; public abstract class AltosEepromRecord implements Comparable { - AltosEepromNew eeprom; + AltosEeprom eeprom; int wide_tick; @@ -74,7 +74,7 @@ public abstract class AltosEepromRecord implements Comparable 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; @@ -87,6 +87,15 @@ public abstract class AltosEepromRecord implements Comparable 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() { @@ -106,7 +115,7 @@ public abstract class AltosEepromRecord implements Comparable 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;