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 8a4e84e099
commit f88f512dc6
1 changed files with 9 additions and 0 deletions

View File

@ -1376,6 +1376,15 @@ void QuadPlane::update(void)
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();
if (!in_vtol_mode()) {