mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Throttle boost (#5508)
* throttle boost which temporarily boosts throttle in both directions to improve response * fix comment and use pt1FilterGain * incorporate review suggestions * incorporate review suggestions * use float constant to avoid double promotion * formatting changes * formatting change * hopefully last style changes
This commit is contained in:
parent
172642383d
commit
efda704ee5
4 changed files with 22 additions and 1 deletions
|
@ -765,6 +765,10 @@ void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensation)
|
|||
}
|
||||
|
||||
motorMixRange = motorMixMax - motorMixMin;
|
||||
if (throttleBoost > 0.0f) {
|
||||
float throttlehpf = throttle - pt1FilterApply(&throttleLpf, throttle);
|
||||
throttle = constrainf(throttle + throttleBoost * throttlehpf, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
if (motorMixRange > 1.0f) {
|
||||
for (int i = 0; i < motorCount; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue