Browse Source

Merge pull request #8362 from DonLakeFlyer/PX4VTOL

Plan: Make PX4 VTOL takeoff work like fixed wing
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
1c50604756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/MissionManager/TakeoffMissionItem.cc
  2. 1
      src/MissionManager/VisualMissionItem.h
  3. 4
      src/PlanView/SimpleItemEditor.qml

2
src/MissionManager/TakeoffMissionItem.cc

@ -115,7 +115,7 @@ bool TakeoffMissionItem::isTakeoffCommand(MAV_CMD command) @@ -115,7 +115,7 @@ bool TakeoffMissionItem::isTakeoffCommand(MAV_CMD command)
void TakeoffMissionItem::_initLaunchTakeoffAtSameLocation(void)
{
if (specifiesCoordinate()) {
if (_vehicle->fixedWing()) {
if (_vehicle->fixedWing() || _vehicle->vtol()) {
setLaunchTakeoffAtSameLocation(false);
} else {
// PX4 specifies a coordinate for takeoff even for non fixed wing. But it makes more sense to not have a coordinate

1
src/MissionManager/VisualMissionItem.h

@ -47,6 +47,7 @@ public: @@ -47,6 +47,7 @@ public:
};
Q_ENUM(ReadyForSaveState)
Q_PROPERTY(Vehicle* vehicle READ vehicle CONSTANT)
Q_PROPERTY(bool homePosition READ homePosition CONSTANT) ///< true: This item is being used as a home position indicator
Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged) ///< This is the entry point for a waypoint line into the item. For a simple item it is also the location of the item
Q_PROPERTY(double terrainAltitude READ terrainAltitude NOTIFY terrainAltitudeChanged) ///< The altitude of terrain at the coordinate position, NaN if not known

4
src/PlanView/SimpleItemEditor.qml

@ -66,7 +66,7 @@ Rectangle { @@ -66,7 +66,7 @@ Rectangle {
visible: missionItem.isTakeoffItem && missionItem.wizardMode // Hack special case for takeoff item
QGCLabel {
text: qsTr("Move 'T' Takeoff to the climbout location.")
text: qsTr("Move 'T' Takeoff to the %1 location.").arg(missionItem.vehicle.vtol ? qsTr("desired") : qsTr("climbout"))
Layout.fillWidth: true
wrapMode: Text.WordWrap
visible: !initialClickLabel.visible
@ -76,7 +76,7 @@ Rectangle { @@ -76,7 +76,7 @@ Rectangle {
text: qsTr("Ensure clear of obstacles and into the wind.")
Layout.fillWidth: true
wrapMode: Text.WordWrap
visible: !initialClickLabel.visible
visible: !initialClickLabel.visible && !missionItem.vehicle.vtol
}
QGCButton {

Loading…
Cancel
Save