Commit 472b2acf authored by Remek Zajac's avatar Remek Zajac

review comment

parent 82b92297
......@@ -1464,7 +1464,6 @@ void MissionController::_recalcMissionFlightStatus()
bool foundRTL = false;
bool vehicleYawSpecificallySet = false;
double totalHorizontalDistance = 0;
bool showGimbalOnlyWhenSet = _planViewSettings->showGimbalWhen()->enumStringValue() == "Set";
for (int i=0; i<_visualItems->count(); i++) {
VisualMissionItem* item = qobject_cast<VisualMissionItem*>(_visualItems->get(i));
......@@ -1512,11 +1511,11 @@ void MissionController::_recalcMissionFlightStatus()
// Look for specific gimbal changes
double gimbalYaw = item->specifiedGimbalYaw();
if (!qIsNaN(gimbalYaw) || showGimbalOnlyWhenSet) {
if (!qIsNaN(gimbalYaw) || _planViewSettings->showGimbalOnlyWhenSet()->rawValue().toBool()) {
_missionFlightStatus.gimbalYaw = gimbalYaw;
}
double gimbalPitch = item->specifiedGimbalPitch();
if (!qIsNaN(gimbalPitch) || showGimbalOnlyWhenSet) {
if (!qIsNaN(gimbalPitch) || _planViewSettings->showGimbalOnlyWhenSet()->rawValue().toBool()) {
_missionFlightStatus.gimbalPitch = gimbalPitch;
}
......
......@@ -30,12 +30,9 @@
"defaultValue": false
},
{
"name": "showGimbalWhen",
"shortDescription": "Show gimbal yaw visual when yaw known/set",
"longDescription": "Shows the gimbal yaw when the it's explcitly set by the user or simply when known (propagated from previous)",
"type": "uint32",
"enumValues": "0,1",
"enumStrings": "Known,Set",
"defaultValue": 0
"name": "showGimbalOnlyWhenSet",
"shortDescription": "Show gimbal yaw visual only when set explicitly for the waypoint",
"type": "bool",
"defaultValue": false
}
]
......@@ -22,4 +22,4 @@ DECLARE_SETTINGSFACT(PlanViewSettings, aboveTerrainWarning)
DECLARE_SETTINGSFACT(PlanViewSettings, showMissionItemStatus)
DECLARE_SETTINGSFACT(PlanViewSettings, useConditionGate)
DECLARE_SETTINGSFACT(PlanViewSettings, takeoffItemNotRequired)
DECLARE_SETTINGSFACT(PlanViewSettings, showGimbalWhen)
DECLARE_SETTINGSFACT(PlanViewSettings, showGimbalOnlyWhenSet)
......@@ -25,5 +25,5 @@ public:
DEFINE_SETTINGFACT(showMissionItemStatus)
DEFINE_SETTINGFACT(useConditionGate)
DEFINE_SETTINGFACT(takeoffItemNotRequired)
DEFINE_SETTINGFACT(showGimbalWhen)
DEFINE_SETTINGFACT(showGimbalOnlyWhenSet)
};
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