Commit 49a9c91f authored by DonLakeFlyer's avatar DonLakeFlyer

parent e2dd7d3f
......@@ -543,9 +543,7 @@ double CameraSection::specifiedGimbalPitch(void) const
void CameraSection::_updateSpecifiedGimbalYaw(void)
{
if (_specifyGimbal) {
emit specifiedGimbalYawChanged(specifiedGimbalYaw());
}
emit specifiedGimbalYawChanged(specifiedGimbalYaw());
}
void CameraSection::_updateSpecifiedGimbalPitch(void)
......
......@@ -1419,7 +1419,21 @@ void MissionController::_recalcMissionFlightStatus()
_missionFlightStatus.vehicleSpeed = newSpeed;
}
// Look for gimbal change
// ROI commands cancel out previous gimbal yaw/pitch
if (simpleItem) {
switch (simpleItem->command()) {
case MAV_CMD_NAV_ROI:
case MAV_CMD_DO_SET_ROI_LOCATION:
case MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET:
_missionFlightStatus.gimbalYaw = std::numeric_limits<double>::quiet_NaN();
_missionFlightStatus.gimbalPitch = std::numeric_limits<double>::quiet_NaN();
break;
default:
break;
}
}
// Look for specific gimbal changes
double gimbalYaw = item->specifiedGimbalYaw();
if (!qIsNaN(gimbalYaw)) {
_missionFlightStatus.gimbalYaw = gimbalYaw;
......
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