mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 13:02:25 +08:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user