- double alt = AltosLib.MISSING;
- String label = null;
-
- if (state != null) {
- if (report_pad(state)) {
- alt = state.pad_alt;
- label = "Pad Altitude";
- } else {
- alt = state.gps.alt;
- label = "Altitude";
- }
- }
- if (alt != last_alt) {
- if (alt != AltosLib.MISSING) {
- show(AltosConvert.height.show(5, alt));
- set_label(label);
- } else
- hide();
- last_alt = alt;
- }
- }