}
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) {
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("???");
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("???");
}
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);