diff --git a/src/MissionManager/MissionSettingsItem.cc b/src/MissionManager/MissionSettingsItem.cc index bb91ce14e4f4cfc69382f154bfa57cb26f70ed24..723b8d025779e04d35980c50f7c8bc6d280b38f6 100644 --- a/src/MissionManager/MissionSettingsItem.cc +++ b/src/MissionManager/MissionSettingsItem.cc @@ -161,26 +161,6 @@ bool MissionSettingsItem::addMissionEndAction(QList& items, int se // IMPORTANT NOTE: If anything changes here you must also change MissionSettingsItem::scanForMissionSettings - // Find last waypoint coordinate information so we have a lat/lon/alt to use - QGeoCoordinate lastWaypointCoord; - MAV_FRAME lastWaypointFrame; - - bool found = false; - for (int i=items.count()-1; i>0; i--) { - MissionItem* missionItem = items[i]; - - const MissionCommandUIInfo* uiInfo = qgcApp()->toolbox()->missionCommandTree()->getUIInfo(_vehicle, (MAV_CMD)missionItem->command()); - if (uiInfo->specifiesCoordinate() && !uiInfo->isStandaloneCoordinate()) { - lastWaypointCoord = missionItem->coordinate(); - lastWaypointFrame = missionItem->frame(); - found = true; - break; - } - } - if (!found) { - return false; - } - if (_missionEndRTL) { qCDebug(MissionSettingsComplexItemLog) << "Appending end action RTL seqNum" << seqNum; item = new MissionItem(seqNum,