Commit a2c9eb95 authored by DoinLakeFlyer's avatar DoinLakeFlyer

parent dfc74e8a
......@@ -23,6 +23,8 @@
#include "RadioComponentController.h"
#include "QGCCameraManager.h"
#include "QGCFileDownload.h"
#include "SettingsManager.h"
#include "PlanViewSettings.h"
#include <QDebug>
......@@ -279,7 +281,7 @@ void PX4FirmwarePlugin::getParameterMetaDataVersionInfo(const QString& metaDataF
QList<MAV_CMD> PX4FirmwarePlugin::supportedMissionCommands(void)
{
return {
QList<MAV_CMD> cmds = {
MAV_CMD_NAV_WAYPOINT,
MAV_CMD_NAV_LOITER_UNLIM, MAV_CMD_NAV_LOITER_TIME, MAV_CMD_NAV_LOITER_TO_ALT,
MAV_CMD_NAV_LAND, MAV_CMD_NAV_TAKEOFF, MAV_CMD_NAV_RETURN_TO_LAUNCH,
......@@ -298,6 +300,12 @@ QList<MAV_CMD> PX4FirmwarePlugin::supportedMissionCommands(void)
MAV_CMD_NAV_DELAY,
MAV_CMD_CONDITION_YAW,
};
if (qgcApp()->toolbox()->settingsManager()->planViewSettings()->useConditionGate()->rawValue().toBool()) {
cmds.append(MAV_CMD_CONDITION_GATE);
}
return cmds;
}
QString PX4FirmwarePlugin::missionCommandOverrides(MAV_TYPE vehicleType) const
......
......@@ -16,5 +16,11 @@
"shortDescription": "Show/Hide the mission item status display",
"type": "bool",
"defaultValue": false
},
{
"name": "useConditionGate",
"shortDescription": "Use MAV_CMD_CONDITION_GATE for pattern generation",
"type": "bool",
"defaultValue": false
}
]
......@@ -20,3 +20,4 @@ DECLARE_SETTINGGROUP(PlanView, "PlanView")
DECLARE_SETTINGSFACT(PlanViewSettings, displayPresetsTabFirst)
DECLARE_SETTINGSFACT(PlanViewSettings, aboveTerrainWarning)
DECLARE_SETTINGSFACT(PlanViewSettings, showMissionItemStatus)
DECLARE_SETTINGSFACT(PlanViewSettings, useConditionGate)
......@@ -23,4 +23,5 @@ public:
DEFINE_SETTINGFACT(displayPresetsTabFirst)
DEFINE_SETTINGFACT(aboveTerrainWarning)
DEFINE_SETTINGFACT(showMissionItemStatus)
DEFINE_SETTINGFACT(useConditionGate)
};
......@@ -621,6 +621,11 @@ Rectangle {
fact: QGroundControl.settingsManager.appSettings.defaultMissionItemAltitude
}
}
FactCheckBox {
text: qsTr("Use MAV_CMD_CONDITION_GATE for pattern generation")
fact: QGroundControl.settingsManager.planViewSettings.useConditionGate
}
}
}
......
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