diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-12 21:47:05 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-12 21:47:05 -0700 |
commit | 172d6cec981b50d4d5ff0f3d3bbd4377d55f57c8 (patch) | |
tree | 58f3ae0e462a784d9e0a9dd4f10f58c42337f1bd /altosuilib/AltosFlightStatsTable.java | |
parent | 5eb91267348b0992414521520eda5c3a65e23ea7 (diff) |
altosuilib: Don't display pad, last location in flight stats without gps
Check stats.have_gps before displaying pad and last known location values.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosFlightStatsTable.java')
-rw-r--r-- | altosuilib/AltosFlightStatsTable.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/altosuilib/AltosFlightStatsTable.java b/altosuilib/AltosFlightStatsTable.java index 70a56110..d88383b8 100644 --- a/altosuilib/AltosFlightStatsTable.java +++ b/altosuilib/AltosFlightStatsTable.java @@ -194,12 +194,12 @@ public class AltosFlightStatsTable extends JComponent implements AltosFontListen if (stats.state_start[AltosLib.ao_flight_boost] < stats.state_start[AltosLib.ao_flight_landed]) new FlightStat(layout, y++, "Flight time", String.format("%6.1f s", stats.landed_time - stats.boost_time)); - if (stats.pad_lat != AltosLib.MISSING) { + if (stats.has_gps && stats.pad_lat != AltosLib.MISSING) { new FlightStat(layout, y++, "Pad location", pos(stats.pad_lat,"N","S"), pos(stats.pad_lon,"E","W")); } - if (stats.lat != AltosLib.MISSING) { + if (stats.has_gps && stats.lat != AltosLib.MISSING) { new FlightStat(layout, y++, "Last reported location", pos(stats.lat,"N","S"), pos(stats.lon,"E","W")); |