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:
parent
bd9f93660b
commit
c9a35d278d
2 changed files with 3 additions and 5 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue