FlightModeManager: fix integral reset on ground

This information could also be used for yaw and integral
resets of the lower level controllers.
This commit is contained in:
Matthias Grob
2020-10-24 17:27:07 +02:00
committed by Daniel Agar
parent 7de288877a
commit fafbb687d8
3 changed files with 6 additions and 1 deletions
@@ -254,6 +254,10 @@ void MulticopterPositionControl::Run()
_control.setConstraints(constraints);
_control.setThrustLimits(constraints.minimum_thrust, _param_mpc_thr_max.get());
if (constraints.reset_integral) {
_control.resetIntegral();
}
// Run position control
if (_control.update(dt)) {
_failsafe_land_hysteresis.set_state_and_update(false, time_stamp_now);