AC_AutoTune: added lower limit on scaler reduction
This commit is contained in:
parent
b897551e0b
commit
e66a360e27
@ -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)
|
void AC_AutoTune::twitching_abort_rate(float angle, float rate, float angle_max, float meas_rate_min)
|
||||||
{
|
{
|
||||||
if (angle >= angle_max) {
|
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
|
// we have reached the angle limit before completing the measurement of maximum and minimum
|
||||||
// reduce the maximum target rate
|
// reduce the maximum target rate
|
||||||
step_scaler *= 0.9f;
|
step_scaler *= 0.9f;
|
||||||
|
Loading…
Reference in New Issue
Block a user