diff options
author | Keith Packard <keithp@keithp.com> | 2017-09-12 13:37:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-09-12 13:37:24 -0700 |
commit | 8960cb525ef43c2262c7854b9a6f08237b3ea05b (patch) | |
tree | 374916207df5a1f0d64684e4accd69edb67c1c3d /altosui/AltosGraphUI.java | |
parent | a4dfaf25954134dbdc7229e2de39d4a4c049f285 (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.java | 2 |
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; } } |