updated dlpf curve math, now it goes from straight to positive

This commit is contained in:
Nicola De Pasquale 2020-02-15 13:49:58 +01:00
parent f96f9cb6e7
commit 2e9516bb63
1 changed files with 1 additions and 1 deletions

View File

@ -1632,7 +1632,7 @@ void dynLpfDTermUpdate(float throttle)
float dynDtermLpfCutoffFreq(float throttle, uint16_t dynLpfMin, uint16_t dynLpfMax, uint8_t expo) {
const float expof = expo / 10.0f;
static float curve;
curve = 2 * throttle * (1 - throttle) * expof + powerf(throttle, 2);
curve = throttle * (1 - throttle) * expof + throttle;
return (dynLpfMax - dynLpfMin) * curve + dynLpfMin;
}