From 077dd3e367b52a51b9034a85456e55da10ad5447 Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Thu, 5 Mar 2020 12:54:41 -0800 Subject: [PATCH] Always how command description. Better support for VTOL Takeoff. New help text for altitude on Land commands. --- src/MissionManager/SimpleMissionItem.cc | 2 +- src/PlanView/SimpleItemEditor.qml | 31 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/MissionManager/SimpleMissionItem.cc b/src/MissionManager/SimpleMissionItem.cc index e8191291f..b22974d54 100644 --- a/src/MissionManager/SimpleMissionItem.cc +++ b/src/MissionManager/SimpleMissionItem.cc @@ -981,6 +981,6 @@ void SimpleMissionItem::_possibleAdditionalTimeDelayChanged(void) bool SimpleMissionItem::isLandCommand(void) const { MAV_CMD command = static_cast(this->command()); - const MissionCommandUIInfo* uiInfo = _commandTree->getUIInfo(_vehicle, command); + const MissionCommandUIInfo* uiInfo = _commandTree->getUIInfo(_controllerVehicle, command); return uiInfo->isLandCommand(); } diff --git a/src/PlanView/SimpleItemEditor.qml b/src/PlanView/SimpleItemEditor.qml index 3b53d3afa..966a02765 100644 --- a/src/PlanView/SimpleItemEditor.qml +++ b/src/PlanView/SimpleItemEditor.qml @@ -59,6 +59,16 @@ Rectangle { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top + spacing: _margin + + QGCLabel { + width: parent.width + wrapMode: Text.WordWrap + font.pointSize: ScreenTools.smallFontPointSize + text: missionItem.rawEdit ? + qsTr("Provides advanced access to all commands/parameters. Be very careful!") : + missionItem.commandDescription + } ColumnLayout { anchors.left: parent.left @@ -67,7 +77,7 @@ Rectangle { visible: missionItem.isTakeoffItem && missionItem.wizardMode // Hack special case for takeoff item QGCLabel { - text: qsTr("Move 'T' Takeoff to the %1 location.").arg(_controllerVehicle.vtol ? qsTr("desired") : qsTr("climbout")) + text: qsTr("Move '%1' Takeoff to the %2 location.").arg(_controllerVehicle.vtol ? qsTr("V") : qsTr("T")).arg(_controllerVehicle.vtol ? qsTr("desired") : qsTr("climbout")) Layout.fillWidth: true wrapMode: Text.WordWrap visible: !initialClickLabel.visible @@ -77,7 +87,7 @@ Rectangle { text: qsTr("Ensure clear of obstacles and into the wind.") Layout.fillWidth: true wrapMode: Text.WordWrap - visible: !initialClickLabel.visible && !_controllerVehicle.vtol + visible: !initialClickLabel.visible } QGCButton { @@ -107,15 +117,6 @@ Rectangle { spacing: _margin visible: !missionItem.wizardMode - QGCLabel { - width: parent.width - wrapMode: Text.WordWrap - font.pointSize: ScreenTools.smallFontPointSize - text: missionItem.rawEdit ? - qsTr("Provides advanced access to all commands/parameters. Be very careful!") : - missionItem.commandDescription - } - GridLayout { anchors.left: parent.left anchors.right: parent.right @@ -162,6 +163,14 @@ Rectangle { anchors.right: parent.right spacing: _margin + QGCLabel { + width: parent.width + wrapMode: Text.WordWrap + font.pointSize: ScreenTools.smallFontPointSize + text: qsTr("Altitude below specifies the approximate altitude of the ground. Normally 0 for landing back at original launch location.") + visible: missionItem.isLandCommand + } + Item { width: altHamburger.x + altHamburger.width height: altModeLabel.height -- 2.22.0