mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Configurable Yaw Pterm Filter
Fix compile error
This commit is contained in:
parent
b4130ee726
commit
6d5dcb5495
5 changed files with 9 additions and 6 deletions
|
@ -173,8 +173,8 @@ static void pidLuxFloat(pidProfile_t *pidProfile, controlRateConfig_t *controlRa
|
|||
// -----calculate P component
|
||||
PTerm = RateError * pidProfile->P_f[axis] * PIDweight[axis] / 100;
|
||||
|
||||
if (axis == YAW) {
|
||||
PTerm = filterApplyPt1(PTerm, &yawPTermState, YAW_PTERM_FILTER, dT);
|
||||
if (axis == YAW && pidProfile->yaw_pterm_cut_hz) {
|
||||
PTerm = filterApplyPt1(PTerm, &yawPTermState, pidProfile->yaw_pterm_cut_hz, dT);
|
||||
}
|
||||
|
||||
// -----calculate I component.
|
||||
|
@ -289,8 +289,8 @@ static void pidRewrite(pidProfile_t *pidProfile, controlRateConfig_t *controlRat
|
|||
// -----calculate P component
|
||||
PTerm = (RateError * pidProfile->P8[axis] * PIDweight[axis] / 100) >> 7;
|
||||
|
||||
if (axis == YAW) {
|
||||
PTerm = filterApplyPt1(PTerm, &yawPTermState, YAW_PTERM_FILTER, dT);
|
||||
if (axis == YAW && pidProfile->yaw_pterm_cut_hz) {
|
||||
PTerm = filterApplyPt1(PTerm, &yawPTermState, pidProfile->yaw_pterm_cut_hz, dT);
|
||||
}
|
||||
|
||||
// -----calculate I component
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue