mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AC_AutoTune: fix pilot testing bug
This commit is contained in:
parent
86173a6573
commit
20a2e2485e
@ -198,6 +198,8 @@ void AC_AutoTune::run()
|
|||||||
const bool zero_rp_input = is_zero(target_roll_cd) && is_zero(target_pitch_cd);
|
const bool zero_rp_input = is_zero(target_roll_cd) && is_zero(target_pitch_cd);
|
||||||
|
|
||||||
const uint32_t now = AP_HAL::millis();
|
const uint32_t now = AP_HAL::millis();
|
||||||
|
|
||||||
|
if (mode != SUCCESS) {
|
||||||
if (!zero_rp_input || !is_zero(target_yaw_rate_cds) || !is_zero(target_climb_rate_cms)) {
|
if (!zero_rp_input || !is_zero(target_yaw_rate_cds) || !is_zero(target_climb_rate_cms)) {
|
||||||
if (!pilot_override) {
|
if (!pilot_override) {
|
||||||
pilot_override = true;
|
pilot_override = true;
|
||||||
@ -223,6 +225,7 @@ void AC_AutoTune::run()
|
|||||||
desired_yaw_cd = ahrs_view->yaw_sensor;
|
desired_yaw_cd = ahrs_view->yaw_sensor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (pilot_override) {
|
if (pilot_override) {
|
||||||
if (now - last_pilot_override_warning > 1000) {
|
if (now - last_pilot_override_warning > 1000) {
|
||||||
gcs().send_text(MAV_SEVERITY_INFO, "AutoTune: pilot overrides active");
|
gcs().send_text(MAV_SEVERITY_INFO, "AutoTune: pilot overrides active");
|
||||||
|
Loading…
Reference in New Issue
Block a user