projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: clarify how EasyMotor gets put into idle mode
[fw/altos]
/
altosui
/
AltosPad.java
diff --git
a/altosui/AltosPad.java
b/altosui/AltosPad.java
index 004bd5344619f30702c9db30a6c6f731d228abc4..e9bb4e41c2802f1003f50ab0c6570c0ce64d2fe3 100644
(file)
--- a/
altosui/AltosPad.java
+++ b/
altosui/AltosPad.java
@@
-214,9
+214,13
@@
public class AltosPad extends AltosUIFlightTab {
class PadAlt extends AltosUIUnitsIndicator {
public double value(AltosState state, int i) {
class PadAlt extends AltosUIUnitsIndicator {
public double value(AltosState state, int i) {
- if (report_pad(state))
- return state.pad_alt;
- else if (state.gps != null)
+ if (report_pad(state)) {
+ double alt = state.gps_ground_altitude();
+ if (alt == AltosLib.MISSING)
+ alt = state.ground_altitude();
+ return alt;
+ }
+ else if (state.gps != null && state.gps.alt != AltosLib.MISSING)
return state.gps.alt;
else
return state.altitude();
return state.gps.alt;
else
return state.altitude();