mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 01:51:35 +08:00
FW Position Control: fix setting of _control_mode_current to AUTO in VTOL landing
The _control_mode_current wasn't updated otherwise, and only done so by luck because we already set the current type to SETPOINT_TYPE_POSITION. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Daniel Agar
parent
4b25fad862
commit
f38fe24a98
@@ -710,6 +710,7 @@ FixedwingPositionControl::set_control_mode_current(const hrt_abstime &now)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
_control_mode_current = FW_POSCTRL_MODE_AUTO;
|
||||||
// in this case we want the waypoint handled as a position setpoint -- a submode in control_auto()
|
// in this case we want the waypoint handled as a position setpoint -- a submode in control_auto()
|
||||||
_pos_sp_triplet.current.type = position_setpoint_s::SETPOINT_TYPE_POSITION;
|
_pos_sp_triplet.current.type = position_setpoint_s::SETPOINT_TYPE_POSITION;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user