From 59365eb4e1f63a1ced1667ac233058a06a8eecef Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 11 Feb 2013 10:34:47 -0800 Subject: altosui: Remove graph series which aren't available Make sure all graph series have actual data underlying them by checking the available data before creating the series objects. Signed-off-by: Keith Packard --- altosui/AltosFlightStatsTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'altosui/AltosFlightStatsTable.java') diff --git a/altosui/AltosFlightStatsTable.java b/altosui/AltosFlightStatsTable.java index 5ed53c1a..a35b5f63 100644 --- a/altosui/AltosFlightStatsTable.java +++ b/altosui/AltosFlightStatsTable.java @@ -126,7 +126,7 @@ public class AltosFlightStatsTable extends JComponent { new FlightStat(layout, y++, "Flight time", String.format("%6.1f s", stats.state_end[Altos.ao_flight_main] - stats.state_start[Altos.ao_flight_boost])); - if (stats.lat != -1 && stats.lon != -1) { + if (stats.has_gps) { new FlightStat(layout, y++, "Pad location", pos(stats.pad_lat,"N","S"), pos(stats.pad_lon,"E","W")); -- cgit v1.2.3