mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-12 12:37:35 +08:00
FlightTaskAuto: remove separate highEnoughForLandingGear function
This commit is contained in:
@@ -117,7 +117,7 @@ bool FlightTaskAuto::update()
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
// if altitude is high enough
|
||||
if (_highEnoughForLandingGear()) {
|
||||
if (_dist_to_ground > 2.f) {
|
||||
_gear.landing_gear = landing_gear_s::GEAR_UP;
|
||||
}
|
||||
|
||||
@@ -850,12 +850,6 @@ void FlightTaskAuto::_updateTrajConstraints()
|
||||
_constraints.speed_up = math::max(_constraints.speed_up, 1.2f * _param_mpc_z_v_auto_up.get());;
|
||||
}
|
||||
|
||||
bool FlightTaskAuto::_highEnoughForLandingGear()
|
||||
{
|
||||
// return true if altitude is above two meters
|
||||
return _dist_to_ground > 2.0f;
|
||||
}
|
||||
|
||||
void FlightTaskAuto::updateParams()
|
||||
{
|
||||
FlightTask::updateParams();
|
||||
|
||||
@@ -115,7 +115,6 @@ protected:
|
||||
bool _checkTakeoff() override { return _want_takeoff; };
|
||||
|
||||
void _prepareLandSetpoints();
|
||||
bool _highEnoughForLandingGear(); /**< Checks if gears can be lowered. */
|
||||
|
||||
void updateParams() override; /**< See ModuleParam class */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user