From aa2c47a56b886f6b3784a806673b44806cc80323 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 26 Jul 2023 16:14:29 +0200 Subject: [PATCH] mission: On an updated mission, don't assume per default that the mission is not valid, use the state from the last mission validation. --- src/modules/navigator/mission.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/navigator/mission.cpp b/src/modules/navigator/mission.cpp index d513556922..c260603d25 100644 --- a/src/modules/navigator/mission.cpp +++ b/src/modules/navigator/mission.cpp @@ -586,7 +586,7 @@ void Mission::update_mission() { - bool failed = true; + bool failed = !_navigator->get_mission_result()->valid; _dataman_cache.invalidate(); _load_mission_index = -1; @@ -653,6 +653,7 @@ Mission::update_mission() } else { PX4_ERR("mission update failed"); + failed = true; } if (failed) {