mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:23:34 +08:00
mc stabilized mode: move from mc_pos_control to mc_att_control
- better in terms of dependencies: - the position controller code depended on position topics for yaw - mc_pos_control does not have to be run for Stabilized mode - the code path is much simpler, and thus less error prone. This is especially important since Stabilized is often used as a fail-safe flight mode.
This commit is contained in:
@@ -53,10 +53,11 @@ bool FlightTaskManualPosition::updateInitialize()
|
||||
|
||||
bool FlightTaskManualPosition::activate()
|
||||
{
|
||||
|
||||
// all requirements from altitude-mode still have to hold
|
||||
bool ret = FlightTaskManualAltitude::activate();
|
||||
|
||||
_constraints.tilt = math::radians(MPC_TILTMAX_AIR.get());
|
||||
|
||||
// set task specific constraint
|
||||
if (_constraints.speed_xy >= MPC_VEL_MANUAL.get()) {
|
||||
_constraints.speed_xy = MPC_VEL_MANUAL.get();
|
||||
|
||||
Reference in New Issue
Block a user