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);