Browse Source

AC_AttitudeControlMulti: fix update_althold_lean_angle_max use of

throttle_in
zr-v5.1
Leonardo Felipe L. S. dos Santos 5 years ago committed by Randy Mackay
parent
commit
07f45e1ef9
  1. 2
      libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp

2
libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp

@ -236,7 +236,7 @@ void AC_AttitudeControl_Multi::update_althold_lean_angle_max(float throttle_in) @@ -236,7 +236,7 @@ void AC_AttitudeControl_Multi::update_althold_lean_angle_max(float throttle_in)
return;
}
float althold_lean_angle_max = acosf(constrain_float(_throttle_in / (AC_ATTITUDE_CONTROL_ANGLE_LIMIT_THROTTLE_MAX * thr_max), 0.0f, 1.0f));
float althold_lean_angle_max = acosf(constrain_float(throttle_in / (AC_ATTITUDE_CONTROL_ANGLE_LIMIT_THROTTLE_MAX * thr_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);
}

Loading…
Cancel
Save