Commit 709a4575 authored by DonLakeFlyer's avatar DonLakeFlyer

Fix possible crash, add takeoff to front for fixed wing

parent ade8ba0b
......@@ -983,6 +983,8 @@ void MissionManager::generateResumeMission(int resumeIndex)
}
}
resumeIndex = qMin(resumeIndex, _missionItems.count() - 1);
int seqNum = 0;
QList<MissionItem*> resumeMission;
......@@ -1001,6 +1003,9 @@ void MissionManager::generateResumeMission(int resumeIndex)
<< MAV_CMD_IMAGE_STOP_CAPTURE
<< MAV_CMD_VIDEO_START_CAPTURE
<< MAV_CMD_VIDEO_STOP_CAPTURE;
if (_vehicle->fixedWing() && _vehicle->px4Firmware()) {
includedResumeCommands << MAV_CMD_NAV_TAKEOFF;
}
bool addHomePosition = _vehicle->firmwarePlugin()->sendHomePositionToVehicle();
int setCurrentIndex = addHomePosition ? 1 : 0;
......
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