Browse Source

AR_AttitudeControl: reset turn-rate I term if not run for 0.2sec

mission-4.1.18
Randy Mackay 7 years ago
parent
commit
67475a9eaa
  1. 1
      libraries/APM_Control/AR_AttitudeControl.cpp

1
libraries/APM_Control/AR_AttitudeControl.cpp

@ -238,6 +238,7 @@ float AR_AttitudeControl::get_steering_out_rate(float desired_rate, bool motor_l @@ -238,6 +238,7 @@ float AR_AttitudeControl::get_steering_out_rate(float desired_rate, bool motor_l
const uint32_t now = AP_HAL::millis();
if ((_steer_turn_last_ms == 0) || ((now - _steer_turn_last_ms) > AR_ATTCONTROL_TIMEOUT_MS)) {
_steer_rate_pid.reset_filter();
_steer_rate_pid.reset_I();
_desired_turn_rate = _ahrs.get_yaw_rate_earth();
}
_steer_turn_last_ms = now;

Loading…
Cancel
Save