Commit b0a1524d authored by Don Gagne's avatar Don Gagne

parent fdfb7f03
import QtQuick 2.3
import QGroundControl 1.0
import QGroundControl.FactSystem 1.0
FactTextField {
unitsLabel: fact ? fact.units + _altitudeModeExtraUnits : ""
showUnits: true
showHelp: true
unitsLabel: fact ? fact.units : ""
extraUnitsLabel: fact ? _altitudeModeExtraUnits : ""
showUnits: true
showHelp: true
property int altitudeMode: QGroundControl.AltitudeModeNone
readonly property string _altModeNoneExtraUnits: ""
readonly property string _altModeRelativeExtraUnits: qsTr(" (Rel)")
readonly property string _altModeAbsoluteExtraUnits: qsTr(" (AMSL)")
readonly property string _altModeAboveTerrainExtraUnits: qsTr(" (Abv Terr)")
readonly property string _altModeTerrainFrameExtraUnits: qsTr(" (TerrF)")
readonly property string _altModeRelativeExtraUnits: qsTr("(Rel)")
readonly property string _altModeAbsoluteExtraUnits: qsTr("(AMSL)")
readonly property string _altModeAboveTerrainExtraUnits: qsTr("(Abv Terr)")
readonly property string _altModeTerrainFrameExtraUnits: qsTr("(TerrF)")
property string _altitudeModeExtraUnits: _altModeRelativeExtraUnits
property string _altitudeModeExtraUnits: _altModeNoneExtraUnits
onAltitudeModeChanged: updateAltitudeModeExtraUnits()
function updateAltitudeModeExtraUnits() {
if (altitudeMode === QGroundControl.AltitudeModeNone) {
......@@ -32,6 +36,4 @@ FactTextField {
_altitudeModeExtraUnits = ""
}
}
onAltitudeModeChanged: updateAltitudeModeExtraUnits()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment