Skip to content

Commit

Permalink
Copter: Autotune: Remove double call to AC_Attitude_Control
Browse files Browse the repository at this point in the history
  • Loading branch information
lthall committed May 16, 2024
1 parent 57dcb55 commit 3bdcc26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/AC_AutoTune/AC_AutoTune_Multi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@ void AC_AutoTune_Multi::twitch_test_run(AxisType test_axis, const float dir_sign
// hold current attitude

if ((tune_type == SP_DOWN) || (tune_type == SP_UP)) {
attitude_control->input_rate_bf_roll_pitch_yaw(0.0f, 0.0f, 0.0f);
// step angle targets on first iteration
if (twitch_first_iter) {
twitch_first_iter = false;
Expand All @@ -1230,7 +1229,9 @@ void AC_AutoTune_Multi::twitch_test_run(AxisType test_axis, const float dir_sign
// request yaw to 20deg
attitude_control->input_angle_step_bf_roll_pitch_yaw(0.0f, 0.0f, dir_sign * target_angle);
break;
}
}
} else {
attitude_control->input_rate_bf_roll_pitch_yaw(0.0f, 0.0f, 0.0f);
}
} else {
attitude_control->input_rate_bf_roll_pitch_yaw_2(0.0f, 0.0f, 0.0f);
Expand Down

0 comments on commit 3bdcc26

Please sign in to comment.