Skip to content

Commit

Permalink
navigator: mission_feasibility_checker: remove lazy comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
TSC21 committed Feb 27, 2019
1 parent 9d348d0 commit 4c88e6e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/modules/navigator/mission_feasibility_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ MissionFeasibilityChecker::checkRotarywing(const mission_s &mission, float home_
bool
MissionFeasibilityChecker::checkFixedwing(const mission_s &mission, float home_alt, bool land_start_req)
{
/*
* Perform checks and issue feedback to the user for all checks
* Mission is only marked as feasible if all checks return true
*/
return (checkTakeoff(mission, home_alt) && checkFixedWingLanding(mission, land_start_req));
/* Perform checks and issue feedback to the user for all checks */
bool resTakeoff = checkTakeoff(mission, home_alt);
bool resLanding = checkFixedWingLanding(mission, land_start_req);

/* Mission is only marked as feasible if all checks return true */
return (resTakeoff && resLanding);
}

bool
Expand Down

0 comments on commit 4c88e6e

Please sign in to comment.