AC_AutoTune: moved axes_completed init

thanks Randy
This commit is contained in:
Andrew Tridgell 2018-12-18 18:53:19 +11:00 committed by Randy Mackay
parent 2277f70456
commit 6d4e886bc9

View File

@ -221,8 +221,6 @@ bool AC_AutoTune::start(void)
pos_control->set_desired_velocity_z(inertial_nav->get_velocity_z()); pos_control->set_desired_velocity_z(inertial_nav->get_velocity_z());
} }
axes_completed = 0;
return true; return true;
} }
@ -879,6 +877,9 @@ void AC_AutoTune::backup_gains_and_initialise()
} else if (yaw_enabled()) { } else if (yaw_enabled()) {
axis = YAW; axis = YAW;
} }
// no axes are complete
axes_completed = 0;
positive_direction = false; positive_direction = false;
step = WAITING_FOR_LEVEL; step = WAITING_FOR_LEVEL;
step_start_time = AP_HAL::millis(); step_start_time = AP_HAL::millis();