Merge pull request #5036 from fujin/bf-rates-rf-rate-incremental

BetaFlight rates: re-add RF_RATE_INCREMENTAL multiplier
This commit is contained in:
Michael Keller 2018-01-26 18:42:16 +13:00 committed by GitHub
commit ff3612c3b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,10 @@ float applyBetaflightRates(const int axis, float rcCommandf, const float rcComma
rcCommandf = rcCommandf * power3(rcCommandfAbs) * expof + rcCommandf * (1 - expof);
}
const float rcRate = currentControlRateProfile->rcRates[axis] / 100.0f;
float rcRate = currentControlRateProfile->rcRates[axis] / 100.0f;
if (rcRate > 2.0f) {
rcRate += RC_RATE_INCREMENTAL * (rcRate - 2.0f);
}
float angleRate = 200.0f * rcRate * rcCommandf;
if (currentControlRateProfile->rates[axis]) {
const float rcSuperfactor = 1.0f / (constrainf(1.0f - (rcCommandfAbs * (currentControlRateProfile->rates[axis] / 100.0f)), 0.01f, 1.00f));