projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Only update GPS data when new GPS information arrives
[fw/altos]
/
altosui
/
AltosTelemetryRecordLegacy.java
diff --git
a/altosui/AltosTelemetryRecordLegacy.java
b/altosui/AltosTelemetryRecordLegacy.java
index f59027ab3ace0db644bbd34f50231d409d440af8..f2f633581922944a89a84fa8405f993ab6822d35 100644
(file)
--- a/
altosui/AltosTelemetryRecordLegacy.java
+++ b/
altosui/AltosTelemetryRecordLegacy.java
@@
-265,8
+265,10
@@
public class AltosTelemetryRecordLegacy extends AltosRecord implements AltosTele
flight_vel = map.get_int(AO_TELEM_ADHOC_SPEED, MISSING);
flight_pres = map.get_int(AO_TELEM_ADHOC_BARO, MISSING);
flight_vel = map.get_int(AO_TELEM_ADHOC_SPEED, MISSING);
flight_pres = map.get_int(AO_TELEM_ADHOC_BARO, MISSING);
- if (map.has(AO_TELEM_GPS_STATE))
+ if (map.has(AO_TELEM_GPS_STATE))
{
gps = new AltosGPS(map);
gps = new AltosGPS(map);
+ new_gps = true;
+ }
else
gps = null;
}
else
gps = null;
}
@@
-355,6
+357,7
@@
public class AltosTelemetryRecordLegacy extends AltosRecord implements AltosTele
}
gps = new AltosGPS(words, i, version);
}
gps = new AltosGPS(words, i, version);
+ new_gps = true;
}
public AltosTelemetryRecordLegacy(String line) throws ParseException, AltosCRCException {
}
public AltosTelemetryRecordLegacy(String line) throws ParseException, AltosCRCException {
@@
-467,6
+470,7
@@
public class AltosTelemetryRecordLegacy extends AltosRecord implements AltosTele
if ((gps_flags & (AO_GPS_VALID|AO_GPS_RUNNING)) != 0) {
gps = new AltosGPS();
if ((gps_flags & (AO_GPS_VALID|AO_GPS_RUNNING)) != 0) {
gps = new AltosGPS();
+ new_gps = true;
seen |= seen_gps_time | seen_gps_lat | seen_gps_lon;
gps.nsat = (gps_flags & AO_GPS_NUM_SAT_MASK);
seen |= seen_gps_time | seen_gps_lat | seen_gps_lon;
gps.nsat = (gps_flags & AO_GPS_NUM_SAT_MASK);