X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosLanded.java;h=d5c8e4341cc33ad965f0fab3254383ff2075ac5a;hb=11a2bb8e28df7ed87542f2ee726f877971f5d52a;hp=0717ffe284243f993381ce4f153aadc810027db6;hpb=f3e68341f6f5daaf26dd162e4f9a06c29988986a;p=fw%2Faltos diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 0717ffe2..d5c8e434 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -43,13 +43,13 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay { } void show() { - label.show(); - value.show(); + label.setVisible(true); + value.setVisible(true); } void hide() { - label.hide(); - value.hide(); + label.setVisible(false); + value.setVisible(false); } void show(String format, double v) { @@ -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);