From 8960cb525ef43c2262c7854b9a6f08237b3ea05b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 12 Sep 2017 13:37:24 -0700 Subject: [PATCH] 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 --- altosui/AltosGraphUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.30.2