mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
Merge pull request #9486 from IllusionFpv/updated-dlpf-curve
Updated DLPF curve
This commit is contained in:
commit
17e620f997
1 changed files with 1 additions and 1 deletions
|
@ -1636,7 +1636,7 @@ void dynLpfDTermUpdate(float throttle)
|
||||||
float dynDtermLpfCutoffFreq(float throttle, uint16_t dynLpfMin, uint16_t dynLpfMax, uint8_t expo) {
|
float dynDtermLpfCutoffFreq(float throttle, uint16_t dynLpfMin, uint16_t dynLpfMax, uint8_t expo) {
|
||||||
const float expof = expo / 10.0f;
|
const float expof = expo / 10.0f;
|
||||||
static float curve;
|
static float curve;
|
||||||
curve = 2 * throttle * (1 - throttle) * expof + powerf(throttle, 2);
|
curve = throttle * (1 - throttle) * expof + throttle;
|
||||||
return (dynLpfMax - dynLpfMin) * curve + dynLpfMin;
|
return (dynLpfMax - dynLpfMin) * curve + dynLpfMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue