Mission feasibility checker: Handle mission with zero elements silently

A mission with zero elements is invalid but should not lead to a warning. Previously a fixed wing aircraft without a mission did emit warnings about a missing land item.
This commit is contained in:
Lorenz Meier
2020-03-07 16:51:56 +01:00
parent 09595f88fc
commit f1f185d209
@@ -58,6 +58,11 @@ MissionFeasibilityChecker::checkMissionFeasible(const mission_s &mission,
float max_distance_to_1st_waypoint, float max_distance_between_waypoints,
bool land_start_req)
{
// trivial case: A mission with length zero cannot be valid
if ((int)mission.count <= 0) {
return false;
}
bool failed = false;
bool warned = false;