From 5f8230ab44fe570fe26f9229883ecace59b424cf Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Tue, 30 Jun 2020 15:29:20 -0700 Subject: [PATCH] Don't hold a mission flight status copy --- src/MissionManager/VisualMissionItem.cc | 7 +++---- src/MissionManager/VisualMissionItem.h | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/MissionManager/VisualMissionItem.cc b/src/MissionManager/VisualMissionItem.cc index 0895cc7bd..1913e4493 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 ce4c43654..93f32d171 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; -- 2.22.0