mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 17:23:33 +08:00
Reposition landing gear check so that it is not overwritten by setpoint operations.
This commit is contained in:
committed by
Matthias Grob
parent
7fe257c0c0
commit
3595941554
@@ -69,6 +69,12 @@ bool FlightTaskAutoMapper::update()
|
||||
if (_type_previous == WaypointType::idle) {
|
||||
_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;
|
||||
|
||||
|
||||
@@ -61,6 +61,12 @@ bool FlightTaskAutoMapper2::update()
|
||||
if (_type_previous == WaypointType::idle) {
|
||||
_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:
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user