From: Keith Packard Date: Tue, 12 Sep 2017 20:37:24 +0000 (-0700) Subject: altosui: Handle missing GPS when graphing mega/metrum data X-Git-Tag: 1.8.2~2^2~13 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=8960cb525ef43c2262c7854b9a6f08237b3ea05b 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 --- 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; } }