Skip to content

Commit

Permalink
AC_AttitudeControl_Heli: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bnsgeyer authored Apr 2, 2024
1 parent e40e253 commit 7ad4546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ float AC_AttitudeControl_Heli::get_throttle_boosted(float throttle_in)
float boost_factor = 1.0f / constrain_float(cos_tilt_target, 0.1f, 1.0f);

// angle boost and inverted factor applied about the zero thrust collective
const float coll_mid = (AP_MotorsHeli&)_motors).get_coll_mid();
const float coll_mid = ((AP_MotorsHeli&)_motors).get_coll_mid();
float throttle_out = ((throttle_in - coll_mid) * inverted_factor * boost_factor) + coll_mid;
_angle_boost = constrain_float(throttle_out - throttle_in, -1.0f, 1.0f);
return throttle_out;
Expand Down

0 comments on commit 7ad4546

Please sign in to comment.