From c1b7e860c967c6804b1685cc8ef098b475ade926 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 22 Aug 2017 21:19:33 -0700 Subject: [PATCH] Fix de-dup --- src/MissionManager/MissionManager.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/MissionManager/MissionManager.cc b/src/MissionManager/MissionManager.cc index ae18e8f9a..2fa4cd40c 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; -- 2.22.0