From 52f29f6e8127b62079f0c8aeb70582c482bdd530 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Mon, 29 Jan 2018 14:14:35 +1300 Subject: [PATCH] Fixed RaceFlight rates calculation. --- src/main/fc/fc_rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/fc/fc_rc.c b/src/main/fc/fc_rc.c index dfe4df3fb..b5949e769 100644 --- a/src/main/fc/fc_rc.c +++ b/src/main/fc/fc_rc.c @@ -108,13 +108,11 @@ float applyBetaflightRates(const int axis, float rcCommandf, const float rcComma float applyRaceFlightRates(const int axis, float rcCommandf, const float rcCommandfAbs) { - UNUSED(rcCommandfAbs); - // -1.0 to 1.0 ranged and curved rcCommandf = ((1.0f + 0.01f * currentControlRateProfile->rcExpo[axis] * (rcCommandf * rcCommandf - 1.0f)) * rcCommandf); // convert to -2000 to 2000 range using acro+ modifier float angleRate = 10.0f * currentControlRateProfile->rcRates[axis] * rcCommandf; - angleRate = angleRate * (1 + (float)currentControlRateProfile->rates[axis] * 0.01f); + angleRate = angleRate * (1 + rcCommandfAbs * (float)currentControlRateProfile->rates[axis] * 0.01f); return angleRate; }