diff --git a/src/MissionManager/VisualMissionItem.cc b/src/MissionManager/VisualMissionItem.cc index 0895cc7bd2025b0b46e7d35ed91b83e06153e6e9..1913e449316dec051fb8d77acf5364dcd11f8809 100644 --- a/src/MissionManager/VisualMissionItem.cc +++ b/src/MissionManager/VisualMissionItem.cc @@ -152,12 +152,11 @@ void VisualMissionItem::setAzimuth(double azimuth) void VisualMissionItem::setMissionFlightStatus(MissionController::MissionFlightStatus_t& missionFlightStatus) { - _missionFlightStatus = missionFlightStatus; - if (qIsNaN(_missionFlightStatus.gimbalYaw) && qIsNaN(_missionGimbalYaw)) { + if (qIsNaN(missionFlightStatus.gimbalYaw) && qIsNaN(_missionGimbalYaw)) { return; } - if (!qFuzzyCompare(_missionFlightStatus.gimbalYaw, _missionGimbalYaw)) { - _missionGimbalYaw = _missionFlightStatus.gimbalYaw; + if (!qFuzzyCompare(missionFlightStatus.gimbalYaw, _missionGimbalYaw)) { + _missionGimbalYaw = missionFlightStatus.gimbalYaw; emit missionGimbalYawChanged(_missionGimbalYaw); } } diff --git a/src/MissionManager/VisualMissionItem.h b/src/MissionManager/VisualMissionItem.h index ce4c43654b3af078ffd5825489b5b38b29d92f9f..93f32d17113aac9510e4d394ac8cbb8f04db827d 100644 --- a/src/MissionManager/VisualMissionItem.h +++ b/src/MissionManager/VisualMissionItem.h @@ -271,8 +271,6 @@ protected: VisualMissionItem* _parentItem = nullptr; QGCGeoBoundingCube _boundingCube; ///< The bounding "cube" of this element. - MissionController::MissionFlightStatus_t _missionFlightStatus; - /// This is used to reference any subsequent mission items which do not specify a coordinate. QmlObjectListModel _childItems;