Browse Source

AC_AutoTune: added lower limit on scaler reduction

mission-4.1.18
Andrew Tridgell 6 years ago
parent
commit
e66a360e27
  1. 2
      libraries/AC_AutoTune/AC_AutoTune.cpp

2
libraries/AC_AutoTune/AC_AutoTune.cpp

@ -1309,7 +1309,7 @@ void AC_AutoTune::twitching_test_rate(float rate, float rate_target_max, float & @@ -1309,7 +1309,7 @@ void AC_AutoTune::twitching_test_rate(float rate, float rate_target_max, float &
void AC_AutoTune::twitching_abort_rate(float angle, float rate, float angle_max, float meas_rate_min)
{
if (angle >= angle_max) {
if (is_equal(rate, meas_rate_min)) {
if (is_equal(rate, meas_rate_min) && step_scaler > 0.5) {
// we have reached the angle limit before completing the measurement of maximum and minimum
// reduce the maximum target rate
step_scaler *= 0.9f;

Loading…
Cancel
Save