Update mixer.c

Make it possible to still be able to disable the jump protection at all by configuring the highest configurable value.
This commit is contained in:
borisbstyle 2015-05-01 17:23:29 +02:00
parent ea7157dadd
commit 16faced65a
1 changed files with 2 additions and 2 deletions

View File

@ -564,8 +564,8 @@ void mixTable(void)
{
uint32_t i;
if (motorCount >= 4) {
// prevent "yaw jump" during yaw correction
if (motorCount >= 4 && mixerConfig->yaw_jump_prevention_limit < 500) {
// prevent "yaw jump" during yaw correction (500 is disabled jump protection)
axisPID[YAW] = constrain(axisPID[YAW], -mixerConfig->yaw_jump_prevention_limit - ABS(rcCommand[YAW]), mixerConfig->yaw_jump_prevention_limit + ABS(rcCommand[YAW]));
}