summaryrefslogtreecommitdiff
path: root/altosui/AltosGraphUI.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-09-12 13:37:24 -0700
committerKeith Packard <keithp@keithp.com>2017-09-12 13:37:24 -0700
commit8960cb525ef43c2262c7854b9a6f08237b3ea05b (patch)
tree374916207df5a1f0d64684e4accd69edb67c1c3d /altosui/AltosGraphUI.java
parenta4dfaf25954134dbdc7229e2de39d4a4c049f285 (diff)
altosui: Handle missing GPS when graphing mega/metrum data
These have GPS, but if we never get a valid packet, then there won't be any final position to display. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosGraphUI.java')
-rw-r--r--altosui/AltosGraphUI.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java
index f6c906c6..042f9277 100644
--- a/altosui/AltosGraphUI.java
+++ b/altosui/AltosGraphUI.java
@@ -48,7 +48,6 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt
if (flight_series.gps_series != null) {
for (AltosGPSTimeValue gtv : flight_series.gps_series) {
- gtv_last = gtv;
AltosGPS gps = gtv.gps;
if (gps != null &&
gps.locked &&
@@ -57,6 +56,7 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt
map = new AltosUIMap();
map.show(gps, (int) flight_series.value_before(AltosFlightSeries.state_name, gtv.time));
this.gps = gps;
+ gtv_last = gtv;
has_gps = true;
}
}