mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Added validation checks for interpolation settings, made throttle boost conditional.
This commit is contained in:
parent
91013da2cc
commit
a373204d7a
5 changed files with 29 additions and 2 deletions
|
@ -803,12 +803,14 @@ FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensa
|
|||
motorMix[i] = mix;
|
||||
}
|
||||
|
||||
motorMixRange = motorMixMax - motorMixMin;
|
||||
#if defined(USE_THROTTLE_BOOST)
|
||||
if (throttleBoost > 0.0f) {
|
||||
float throttlehpf = throttle - pt1FilterApply(&throttleLpf, throttle);
|
||||
throttle = constrainf(throttle + throttleBoost * throttlehpf, 0.0f, 1.0f);
|
||||
}
|
||||
#endif
|
||||
|
||||
motorMixRange = motorMixMax - motorMixMin;
|
||||
if (motorMixRange > 1.0f) {
|
||||
for (int i = 0; i < motorCount; i++) {
|
||||
motorMix[i] /= motorMixRange;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue