forked from Archive/PX4-Autopilot
Reposition landing gear check so that it is not overwritten by setpoint operations. (#13412)
This commit is contained in:
parent
37cc877c80
commit
748b664ad0
|
@ -70,6 +70,12 @@ bool FlightTaskAutoMapper::update()
|
|||
_thrust_setpoint = Vector3f(NAN, NAN, NAN);
|
||||
}
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
// if altitude is high enough
|
||||
if (_highEnoughForLandingGear()) {
|
||||
_gear.landing_gear = _mission_gear;
|
||||
}
|
||||
|
||||
if (_type == WaypointType::idle) {
|
||||
_generateIdleSetpoints();
|
||||
|
||||
|
@ -92,12 +98,6 @@ bool FlightTaskAutoMapper::update()
|
|||
_yawspeed_setpoint);
|
||||
}
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
// if altitude is high enough
|
||||
if (_highEnoughForLandingGear()) {
|
||||
_gear.landing_gear = _mission_gear;
|
||||
}
|
||||
|
||||
// update previous type
|
||||
_type_previous = _type;
|
||||
|
||||
|
|
|
@ -62,6 +62,12 @@ bool FlightTaskAutoMapper2::update()
|
|||
_thrust_setpoint = Vector3f(NAN, NAN, NAN);
|
||||
}
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
// if altitude is high enough
|
||||
if (_highEnoughForLandingGear()) {
|
||||
_gear.landing_gear = landing_gear_s::GEAR_UP;
|
||||
}
|
||||
|
||||
switch (_type) {
|
||||
case WaypointType::idle:
|
||||
_prepareIdleSetpoints();
|
||||
|
@ -100,12 +106,6 @@ bool FlightTaskAutoMapper2::update()
|
|||
|
||||
_generateSetpoints();
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
// if altitude is high enough
|
||||
if (_highEnoughForLandingGear()) {
|
||||
_gear.landing_gear = landing_gear_s::GEAR_UP;
|
||||
}
|
||||
|
||||
// update previous type
|
||||
_type_previous = _type;
|
||||
|
||||
|
|
Loading…
Reference in New Issue