diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 33bd904c05..e42c9364da 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -1159,12 +1159,9 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTim float agBoostAttenuator = fabsf(currentPidSetpoint) / 50.0f; agBoostAttenuator = MAX(agBoostAttenuator, 1.0f); const float agBoost = 1.0f + (pidRuntime.antiGravityPBoost / agBoostAttenuator); - pidData[axis].P *= agBoost; - if (axis == FD_ROLL) { - DEBUG_SET(DEBUG_ANTI_GRAVITY, 2, lrintf(agBoost * 1000)); - } - if (axis == FD_PITCH) { - DEBUG_SET(DEBUG_ANTI_GRAVITY, 3, lrintf(agBoost * 1000)); + if (axis != FD_YAW) { + pidData[axis].P *= agBoost; + DEBUG_SET(DEBUG_ANTI_GRAVITY, axis + 2, lrintf(agBoost * 1000)); } const float pidSum = pidData[axis].P + pidData[axis].I + pidData[axis].D + pidData[axis].F;