summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
03ec3e4)
This was attempting to use 'pad' values even though monitor idle
doesn't have them.
Signed-off-by: Keith Packard <keithp@keithp.com>
}
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)
if (report_pad(state)) {
lat = state.pad_lat;
label = "Pad Latitude";
if (report_pad(state)) {
lat = state.pad_lat;
label = "Pad Latitude";
+ } else if (state.gps != null) {
lat = state.gps.lat;
label = "Latitude";
}
lat = state.gps.lat;
label = "Latitude";
}
if (report_pad(state)) {
lon = state.pad_lon;
label = "Pad Longitude";
if (report_pad(state)) {
lon = state.pad_lon;
label = "Pad Longitude";
+ } else if (state.gps != null) {
lon = state.gps.lon;
label = "Longitude";
}
lon = state.gps.lon;
label = "Longitude";
}
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 if (state.gps != null)
+ else
+ return state.altitude();
}
public void show (AltosState state, AltosListenerState listener_state) {
}
public void show (AltosState state, AltosListenerState listener_state) {