From da946288a208bfa76d0f2eb7defd0b57b68474eb Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 8 Jun 2016 17:49:05 +0900 Subject: [PATCH] AC_AttitudeControl: rename throttle_ave_max to throttle_avg_max --- libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp | 4 ++-- libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp b/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp index ec218bf2b9..d1a6874514 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp @@ -176,7 +176,7 @@ void AC_AttitudeControl_Multi::set_throttle_out(float throttle_in, bool apply_an _angle_boost = 0.0f; } _motors.set_throttle(throttle_in); - _motors.set_throttle_ave_max(get_throttle_ave_max(MAX(throttle_in, _throttle_in))); + _motors.set_throttle_avg_max(get_throttle_avg_max(MAX(throttle_in, _throttle_in))); } // returns a throttle including compensation for roll/pitch angle @@ -201,7 +201,7 @@ float AC_AttitudeControl_Multi::get_throttle_boosted(float throttle_in) // returns a throttle including compensation for roll/pitch angle // throttle value should be 0 ~ 1 -float AC_AttitudeControl_Multi::get_throttle_ave_max(float throttle_in) +float AC_AttitudeControl_Multi::get_throttle_avg_max(float throttle_in) { return MAX(throttle_in, throttle_in*MAX(0.0f,1.0f-_throttle_rpy_mix)+_motors.get_throttle_hover()*_throttle_rpy_mix); } diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.h b/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.h index ac05cc2864..26b137b6bf 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.h +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.h @@ -62,7 +62,7 @@ public: float get_throttle_boosted(float throttle_in); // calculate total body frame throttle required to produce the given earth frame throttle - float get_throttle_ave_max(float throttle_in); + float get_throttle_avg_max(float throttle_in); // set desired throttle vs attitude mixing (actual mix is slewed towards this value over 1~2 seconds) // low values favour pilot/autopilot throttle over attitude control, high values favour attitude control over throttle