summaryrefslogtreecommitdiff
path: root/altosui/AltosGraphUI.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-27 00:27:04 -0700
committerKeith Packard <keithp@keithp.com>2017-05-27 00:27:04 -0700
commitb6b5c64f93fa56bcb22ea1c4279e4f754e6e6f1c (patch)
tree6ec6ecb767be291c8712030e0097fae051652637 /altosui/AltosGraphUI.java
parent8b4dcca73c65e87462d5f8d08dbc025aa8cf08a6 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosGraphUI.java')
-rw-r--r--altosui/AltosGraphUI.java24
1 files changed, 13 insertions, 11 deletions
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) {