altosui: Report baro ground alt for 'Pad Altitude' when GPS missing
authorKeith Packard <keithp@keithp.com>
Thu, 26 Mar 2020 17:01:48 +0000 (10:01 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 26 Mar 2020 17:01:48 +0000 (10:01 -0700)
commita6687ce902a3011796aee93f87d08545e5f0cec9
tree1e1216f82676bcfbfd4ec017be34907b84eb39ec
parent455a059b9c44332b8dadd87fba31d194f66997b5
altosui: Report baro ground alt for 'Pad Altitude' when GPS missing

The 'Pad Altitude' field in the pad tab of AltosUI was originally one
of three fields designed to report the GPS position of the pad. When
TeleMini was added, the code was updated to separate the lat/lon from
altitude display, but the pad_alt field in AltosState used for that
was still only computed from GPS data.

This fix gets rid of the confusing 'pad_alt' field in AltosState and
has the 'Pad Altitude' data select either GPS ground altitude or baro
ground altitude, depending on whether GPS data is available.

signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosState.java
altosui/AltosPad.java
altosuilib/AltosInfoTable.java