1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00

yaw protection pirouette // hard yaw manouvres

This commit is contained in:
borisbstyle 2016-03-05 20:27:07 +01:00
parent bd9f93660b
commit c9a35d278d
2 changed files with 3 additions and 5 deletions

View file

@ -782,14 +782,12 @@ void mixTable(void)
uint32_t i;
fix12_t vbatCompensationFactor;
static fix12_t mixReduction;
uint8_t axis;
bool isFailsafeActive = failsafeIsActive(); // TODO - Find out if failsafe checks are really needed here in mixer code
if (motorLimitReached) {
uint8_t pidAttenuation = constrain(qPercent(mixReduction), 30, 100);
for (axis = 0; axis < 2; axis++) axisPID[axis] *= pidAttenuation / 100;
if (debugMode == DEBUG_AIRMODE) debug[0] = pidAttenuation;
axisPID[YAW] *= constrain(qPercent(mixReduction), 40, 100);
if (debugMode == DEBUG_AIRMODE) debug[0] = axisPID[YAW];
}
if (IS_RC_MODE_ACTIVE(BOXACROPLUS)) {