Disable setpointweight on other modes than acro // Remove forced rc smoothing for level modes

This commit is contained in:
U-DESKTOP-12PPI61\boris.bozic 2017-06-09 14:28:51 +02:00
parent 617d36a6a9
commit 45c578c8b6
2 changed files with 4 additions and 4 deletions

View File

@ -189,7 +189,7 @@ void processRcCommand(void)
}
}
if (rxConfig()->rcInterpolation || flightModeFlags) {
if (rxConfig()->rcInterpolation) {
// Set RC refresh rate for sampling and channels to filter
switch(rxConfig()->rcInterpolation) {
case(RC_SMOOTHING_AUTO):

View File

@ -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)