FixedWingAttitudeControl: don't lock integrator during transition

- airframes that are not well trimmed rely on the integrator to learn
the offset. This change can help improve altitude hold during transitions

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2019-06-28 09:54:40 -04:00
committed by Daniel Agar
parent 7bba5a7287
commit 0b2af5c519
@@ -562,7 +562,7 @@ void FixedwingAttitudeControl::run()
/* lock integrator until control is started */
bool lock_integrator = !_vcontrol_mode.flag_control_rates_enabled
|| _vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING;
|| (_vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && ! _vehicle_status.in_transition_mode);
/* Simple handling of failsafe: deploy parachute if failsafe is on */
if (_vcontrol_mode.flag_control_termination_enabled) {