From 84e6c59fdd10b985de8f66796b59e1d2d99f8682 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 29 Jan 2020 10:57:53 +0900 Subject: [PATCH] AC_AttitudeControlHeli: fix update_althold_lean_angle_max use of throttle_in --- libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp b/libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp index 35768a275c..e385526376 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp @@ -325,7 +325,7 @@ void AC_AttitudeControl_Heli::rate_controller_run() // Update Alt_Hold angle maximum void AC_AttitudeControl_Heli::update_althold_lean_angle_max(float throttle_in) { - float althold_lean_angle_max = acosf(constrain_float(_throttle_in / AC_ATTITUDE_HELI_ANGLE_LIMIT_THROTTLE_MAX, 0.0f, 1.0f)); + float althold_lean_angle_max = acosf(constrain_float(throttle_in / AC_ATTITUDE_HELI_ANGLE_LIMIT_THROTTLE_MAX, 0.0f, 1.0f)); _althold_lean_angle_max = _althold_lean_angle_max + (_dt / (_dt + _angle_limit_tc)) * (althold_lean_angle_max - _althold_lean_angle_max); }