Plane: relax controllers when disarmed

this prevents any remaining integrator from a previous flight stage from
affecting flight across a disarm
This commit is contained in:
Andrew Tridgell 2017-10-29 17:08:43 +11:00
parent 951c947bec
commit 02f8d888c3
1 changed files with 9 additions and 0 deletions

View File

@ -1374,6 +1374,15 @@ void QuadPlane::update(void)
return; return;
} }
if (!hal.util->get_soft_armed()) {
/*
make sure we don't have any residual control from previous flight stages
*/
attitude_control->relax_attitude_controllers();
attitude_control->reset_rate_controller_I_terms();
pos_control->relax_alt_hold_controllers(0);
}
check_yaw_reset(); check_yaw_reset();
if (!in_vtol_mode()) { if (!in_vtol_mode()) {