diff --git a/src/MissionManager/MissionManager.cc b/src/MissionManager/MissionManager.cc index ae18e8f9acfbdbf02a01e1eb2d5d565a1de9d8f9..2fa4cd40c7b41cfd58247add2d49097cdfd6ba59 100644 --- a/src/MissionManager/MissionManager.cc +++ b/src/MissionManager/MissionManager.cc @@ -1076,12 +1076,13 @@ void MissionManager::generateResumeMission(int resumeIndex) foundCameraStartStop = true; break; case MAV_CMD_IMAGE_START_CAPTURE: - // Only keep the first of these commands that are found - if (foundCameraStartStop) { + if (resumeItem->param3() != 0) { + // Remove commands which do not trigger by time resumeMission.removeAt(prefixCommandCount); + break; } - if (resumeItem->param3() != 0) { - // Remove commands which do no trigger by time + if (foundCameraStartStop) { + // Only keep the first of these commands that are found resumeMission.removeAt(prefixCommandCount); } foundCameraStartStop = true;