Unverified Commit 425263e7 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7804 from Aeronavics/ArduPilot_Takeoff_must_be_first_mission_command_7799

Add Takeoff SimpleItem if first item is complex
parents 187d2c75 8b4d25bd
......@@ -410,6 +410,12 @@ int MissionController::insertComplexMissionItem(QString itemName, QGeoCoordinate
{
ComplexMissionItem* newItem;
// If the ComplexMissionItem is inserted first, add a TakeOff SimpleMissionItem
if (_visualItems->count() == 1 && (_controllerVehicle->fixedWing() || _controllerVehicle->vtol() || _controllerVehicle->multiRotor())) {
insertSimpleMissionItem(mapCenterCoordinate, i);
i++;
}
int sequenceNumber = _nextSequenceNumber();
if (itemName == _surveyMissionItemName) {
newItem = new SurveyComplexItem(_controllerVehicle, _flyView, QString() /* kmlFile */, _visualItems /* parent */);
......
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