clang-tidy: enable performance-unnecessary-value-param and fix

This commit is contained in:
Daniel Agar
2019-10-27 17:06:14 -04:00
parent 4a7a9a1ba9
commit d545825bf0
5 changed files with 15 additions and 15 deletions
@@ -66,7 +66,7 @@ void RateControl::setSaturationStatus(const MultirotorMixer::saturation_status &
_mixer_saturation_negative[2] = status.flags.yaw_neg;
}
Vector3f RateControl::update(const Vector3f rate, const Vector3f rate_sp, const float dt, const bool landed)
Vector3f RateControl::update(const Vector3f &rate, const Vector3f &rate_sp, const float dt, const bool landed)
{
// angular rates error
Vector3f rate_error = rate_sp - rate;
@@ -93,7 +93,8 @@ public:
* @param dt desired vehicle angular rate setpoint
* @return [-1,1] normalized torque vector to apply to the vehicle
*/
matrix::Vector3f update(const matrix::Vector3f rate, const matrix::Vector3f rate_sp, const float dt, const bool landed);
matrix::Vector3f update(const matrix::Vector3f &rate, const matrix::Vector3f &rate_sp, const float dt,
const bool landed);
/**
* Set the integral term to 0 to prevent windup