Skip to content

Commit

Permalink
AC_AutoTune: another try
Browse files Browse the repository at this point in the history
  • Loading branch information
bnsgeyer authored Dec 1, 2024
1 parent 059ac97 commit 97673b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/AC_AutoTune/AC_AutoTune_Heli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@ void AC_AutoTune_Heli::dwell_test_run(sweep_info &test_data)
if (is_positive(dwell_freq)) {
float ang_limit_rate = radians(rate_max) / dwell_freq;
float ang_limit_accel = radians(accel_max) / sq(dwell_freq);
tgt_att_limited = MIN(tgt_attitude, ang_limit_rate, ang_limit_accel);
float tgt_att_temp = MIN(ang_limit_rate, tgt_attitude);
tgt_att_limited = MIN(ang_limit_rate, tgt_att_trmp);
}
target_angle_cd = -chirp_input.update((now - dwell_start_time_ms) * 0.001, degrees(tgt_att_limited) * 100.0f);
dwell_freq = chirp_input.get_frequency_rads();
Expand Down

0 comments on commit 97673b0

Please sign in to comment.