2019-09-28 10:37:57 -03:00
|
|
|
#include "Copter.h"
|
|
|
|
|
|
|
|
// Run standby functions at approximately 100 Hz to limit maximum variable build up
|
|
|
|
//
|
|
|
|
// When standby is active:
|
|
|
|
// all I terms are continually reset
|
|
|
|
// heading error is reset to zero
|
|
|
|
// position errors are reset to zero
|
|
|
|
// crash_check is disabled
|
|
|
|
// thrust_loss_check is disabled
|
|
|
|
// parachute_check is disabled
|
2021-05-17 20:17:08 -03:00
|
|
|
// hover throttle learn is disabled
|
2019-09-28 10:37:57 -03:00
|
|
|
// and landing detection is disabled.
|
|
|
|
void Copter::standby_update()
|
|
|
|
{
|
|
|
|
if (!standby_active) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
attitude_control->reset_rate_controller_I_terms();
|
2021-05-24 10:42:19 -03:00
|
|
|
attitude_control->reset_yaw_target_and_rate();
|
2019-09-28 10:37:57 -03:00
|
|
|
pos_control->standby_xyz_reset();
|
|
|
|
}
|