FlightTaskAuto: remove separate highEnoughForLandingGear function

This commit is contained in:
Matthias Grob
2024-04-08 08:14:14 +02:00
parent 5f61e3b785
commit 32e66c0907
2 changed files with 1 additions and 8 deletions
@@ -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 */