summaryrefslogtreecommitdiff
path: root/altosui/AltosLanded.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/AltosLanded.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/AltosLanded.java')
-rw-r--r--altosui/AltosLanded.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java
index 63a2daf6..d5c8e434 100644
--- a/altosui/AltosLanded.java
+++ b/altosui/AltosLanded.java
@@ -99,7 +99,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay {
class Lat extends LandedValue {
void show (AltosState state, int crc_errors) {
show();
- if (state.gps != null)
+ if (state.gps != null && state.gps.connected)
value.setText(pos(state.gps.lat,"N", "S"));
else
value.setText("???");
@@ -114,7 +114,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay {
class Lon extends LandedValue {
void show (AltosState state, int crc_errors) {
show();
- if (state.gps != null)
+ if (state.gps != null && state.gps.connected)
value.setText(pos(state.gps.lon,"E", "W"));
else
value.setText("???");
@@ -200,7 +200,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay {
}
public void show(AltosState state, int crc_errors) {
- if (state.gps != null) {
+ if (state.gps != null && state.gps.connected) {
bearing.show(state, crc_errors);
distance.show(state, crc_errors);
lat.show(state, crc_errors);