mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Disable setpointweight on other modes than acro // Remove forced rc smoothing for level modes
This commit is contained in:
parent
617d36a6a9
commit
45c578c8b6
2 changed files with 4 additions and 4 deletions
|
@ -436,9 +436,9 @@ void pidController(const pidProfile_t *pidProfile, const rollAndPitchTrims_t *an
|
|||
float gyroRateFiltered = dtermNotchFilterApplyFn(dtermFilterNotch[axis], gyroRate);
|
||||
gyroRateFiltered = dtermLpfApplyFn(dtermFilterLpf[axis], gyroRateFiltered);
|
||||
|
||||
float dynC = dtermSetpointWeight;
|
||||
if (pidProfile->setpointRelaxRatio < 100) {
|
||||
dynC *= MIN(getRcDeflectionAbs(axis) * relaxFactor, 1.0f);
|
||||
float dynC = 0;
|
||||
if ( (pidProfile->setpointRelaxRatio < 100) && (!flightModeFlags) ) {
|
||||
dynC = dtermSetpointWeight * MIN(getRcDeflectionAbs(axis) * relaxFactor, 1.0f);
|
||||
}
|
||||
const float rD = dynC * currentPidSetpoint - gyroRateFiltered; // cr - y
|
||||
// Divide rate change by dT to get differential (ie dr/dt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue