summaryrefslogtreecommitdiff
path: root/altosui/AltosInfoTable.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-06 21:38:57 -0700
committerKeith Packard <keithp@keithp.com>2011-07-06 21:38:57 -0700
commit8f80f5705d64469bcfb00ff11aee68364edb271b (patch)
tree9db032cfcb647951259c9ff7f0deabea682271cf /altosui/AltosInfoTable.java
parent80ca066a825646f833ca609190c76c5252118d9a (diff)
altosui: Don't show missing igniter and gps values
The new telemetry stuff leaves state.gps always set (but empty), which seems fine, we just need to look at state.gps.connected to see if there's a GPS receiver on board. For TeleNano, we also want to hide the igniter status fields as they won't have any data present. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosInfoTable.java')
-rw-r--r--altosui/AltosInfoTable.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java
index 723f8301..8ebeaba1 100644
--- a/altosui/AltosInfoTable.java
+++ b/altosui/AltosInfoTable.java
@@ -107,10 +107,12 @@ public class AltosInfoTable extends JTable {
info_add_row(0, "Max Speed", "%8.1f m/s", state.max_speed);
info_add_row(0, "Temperature", "%9.2f °C", state.temperature);
info_add_row(0, "Battery", "%9.2f V", state.battery);
- info_add_row(0, "Drogue", "%9.2f V", state.drogue_sense);
- info_add_row(0, "Main", "%9.2f V", state.main_sense);
+ if (state.drogue_sense != AltosRecord.MISSING)
+ info_add_row(0, "Drogue", "%9.2f V", state.drogue_sense);
+ if (state.main_sense != AltosRecord.MISSING)
+ info_add_row(0, "Main", "%9.2f V", state.main_sense);
info_add_row(0, "Pad altitude", "%6.0f m", state.ground_altitude);
- if (state.gps == null) {
+ if (state.gps == null || !state.gps.connected) {
info_add_row(1, "GPS", "not available");
} else {
if (state.gps_ready)