Navigator: Warn only for non-zero missions

Previously a zero-length mission that failed checks
(e.g. because a mandatory element was not present) would lead to a
warning.
This commit is contained in:
Lorenz Meier
2020-03-14 17:50:40 +01:00
parent 39e473f988
commit 417d172a72
+6 -2
View File
@@ -509,11 +509,15 @@ Mission::update_mission()
}
if (failed) {
// only warn if the check failed on merit
if ((int)_mission.count > 0) {
PX4_WARN("mission check failed");
}
// reset the mission
_mission.count = 0;
_mission.current_seq = 0;
_current_mission_index = 0;
PX4_ERR("mission check failed");
}
// find and store landing start marker (if available)