From b6b5c64f93fa56bcb22ea1c4279e4f754e6e6f1c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 27 May 2017 00:27:04 -0700 Subject: altosdroid: Deal with AltosState changes cal data split out from altos state. altos state needed to have no-arguments constructor for JSON code. Also messed with voice to make it stay quiet during app startup. Signed-off-by: Keith Packard --- altosui/AltosGraphUI.java | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'altosui/AltosGraphUI.java') diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index db0cac2f..71aa0e6f 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -46,17 +46,19 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt boolean any_gps = false; AltosGPSTimeValue gtv_last = null; - for (AltosGPSTimeValue gtv : flight_series.gps_series) { - gtv_last = gtv; - AltosGPS gps = gtv.gps; - if (gps != null && - gps.locked && - gps.nsat >= 4) { - if (map == null) - map = new AltosUIMap(); - map.show(gps, (int) flight_series.value_before(AltosFlightSeries.state_name, gtv.time)); - this.gps = gps; - has_gps = true; + 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 && + gps.nsat >= 4) { + if (map == null) + map = new AltosUIMap(); + map.show(gps, (int) flight_series.value_before(AltosFlightSeries.state_name, gtv.time)); + this.gps = gps; + has_gps = true; + } } } if (gtv_last != null) { -- cgit v1.2.3