- 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;
- }
- }
-
- public void reset() {
- super.reset();
- last_alt = AltosLib.MISSING - 1;
+ if (state != null && report_pad(state))
+ label = "Pad Altitude";
+ set_label(label);
+ super.show(state, listener_state);