mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 08:50:34 +08:00
improved function naming
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ void FeasibilityChecker::reset()
|
||||
|
||||
_mission_validity_failed = false;
|
||||
_takeoff_failed = false;
|
||||
_fixed_wing_landing_failed = false;
|
||||
_land_pattern_validity_failed = false;
|
||||
_distance_first_waypoint_failed = false;
|
||||
_distance_between_waypoints_failed = false;
|
||||
_below_home_alt_failed = false;
|
||||
@@ -201,15 +201,16 @@ void FeasibilityChecker::doCommonChecks(mission_item_s &mission_item, const int
|
||||
|
||||
void FeasibilityChecker::doVtolChecks(mission_item_s &mission_item, const int current_index)
|
||||
{
|
||||
if (!_fixed_wing_landing_failed) {
|
||||
_fixed_wing_landing_failed = !checkFixedWingLanding(mission_item, current_index);
|
||||
if (!_land_pattern_validity_failed) {
|
||||
_land_pattern_validity_failed = !checkLandPatternValidity(mission_item, current_index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FeasibilityChecker::doFixedWingChecks(mission_item_s &mission_item, const int current_index)
|
||||
{
|
||||
if (!_fixed_wing_landing_failed) {
|
||||
_fixed_wing_landing_failed = !checkFixedWingLanding(mission_item, current_index);
|
||||
if (!_land_pattern_validity_failed) {
|
||||
_land_pattern_validity_failed = !checkLandPatternValidity(mission_item, current_index);
|
||||
}
|
||||
|
||||
if (!_fixed_wing_land_approach_failed) {
|
||||
@@ -487,7 +488,7 @@ bool FeasibilityChecker::checkFixedWindLandApproach(mission_item_s &mission_item
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FeasibilityChecker::checkFixedWingLanding(mission_item_s &mission_item, const int current_index)
|
||||
bool FeasibilityChecker::checkLandPatternValidity(mission_item_s &mission_item, const int current_index)
|
||||
{
|
||||
|
||||
// if DO_LAND_START found then require valid landing AFTER
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
return _takeoff_failed ||
|
||||
_distance_first_waypoint_failed ||
|
||||
_distance_between_waypoints_failed ||
|
||||
_fixed_wing_landing_failed ||
|
||||
_land_pattern_validity_failed ||
|
||||
_fixed_wing_land_approach_failed ||
|
||||
_below_home_alt_failed ||
|
||||
_mission_validity_failed ||
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
// internal flags to keep track of which checks failed
|
||||
bool _mission_validity_failed{false};
|
||||
bool _takeoff_failed{false};
|
||||
bool _fixed_wing_landing_failed{false};
|
||||
bool _land_pattern_validity_failed{false};
|
||||
bool _distance_first_waypoint_failed{false};
|
||||
bool _distance_between_waypoints_failed{false};
|
||||
bool _below_home_alt_failed{false};
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
// methods which are called for each mission item
|
||||
bool checkMissionItemValidity(mission_item_s &mission_item, const int current_index);
|
||||
bool checkTakeoff(mission_item_s &mission_item);
|
||||
bool checkFixedWingLanding(mission_item_s &mission_item, const int current_index);
|
||||
bool checkLandPatternValidity(mission_item_s &mission_item, const int current_index);
|
||||
bool checkDistanceToFirstWaypoint(mission_item_s &mission_item);
|
||||
bool checkDistancesBetweenWaypoints(const mission_item_s &mission_item);
|
||||
bool checkIfBelowHomeAltitude(const mission_item_s &mission_item, const int current_index);
|
||||
|
||||
Reference in New Issue
Block a user