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:
Beat Küng
2018-11-13 09:30:18 +01:00
parent f31f63fff7
commit ca7acae904
11 changed files with 297 additions and 345 deletions
@@ -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();