projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Display current altitude in monitor idle Pad tab
[fw/altos]
/
altosui
/
AltosPad.java
diff --git
a/altosui/AltosPad.java
b/altosui/AltosPad.java
index 73da9933501a0707d470f62c7acd1c261ce1c9a9..a29cdd6f92273b93ca9dffa909e9c946b65908ec 100644
(file)
--- a/
altosui/AltosPad.java
+++ b/
altosui/AltosPad.java
@@
-128,10
+128,8
@@
public class AltosPad extends AltosUIFlightTab {
}
boolean report_pad(AltosState state) {
}
boolean report_pad(AltosState state) {
- if ((state.state() == AltosLib.ao_flight_stateless ||
- state.state() < AltosLib.ao_flight_pad) &&
- state.gps != null &&
- state.gps.lat != AltosLib.MISSING)
+ if (state.state() == AltosLib.ao_flight_stateless ||
+ state.state() < AltosLib.ao_flight_pad)
{
return false;
}
{
return false;
}
@@
-150,7
+148,7
@@
public class AltosPad extends AltosUIFlightTab {
if (report_pad(state)) {
lat = state.pad_lat;
label = "Pad Latitude";
if (report_pad(state)) {
lat = state.pad_lat;
label = "Pad Latitude";
- } else {
+ } else
if (state.gps != null)
{
lat = state.gps.lat;
label = "Latitude";
}
lat = state.gps.lat;
label = "Latitude";
}
@@
-187,7
+185,7
@@
public class AltosPad extends AltosUIFlightTab {
if (report_pad(state)) {
lon = state.pad_lon;
label = "Pad Longitude";
if (report_pad(state)) {
lon = state.pad_lon;
label = "Pad Longitude";
- } else {
+ } else
if (state.gps != null)
{
lon = state.gps.lon;
label = "Longitude";
}
lon = state.gps.lon;
label = "Longitude";
}
@@
-217,8
+215,10
@@
public class AltosPad extends AltosUIFlightTab {
public double value(AltosState state, int i) {
if (report_pad(state))
return state.pad_alt;
public double value(AltosState state, int i) {
if (report_pad(state))
return state.pad_alt;
- else
+ else
if (state.gps != null)
return state.gps.alt;
return state.gps.alt;
+ else
+ return state.altitude();
}
public void show (AltosState state, AltosListenerState listener_state) {
}
public void show (AltosState state, AltosListenerState listener_state) {