From c9a35d278d97963ae82c03a57ec93f161bee94f3 Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Sat, 5 Mar 2016 20:27:07 +0100 Subject: [PATCH] yaw protection pirouette // hard yaw manouvres --- src/main/flight/mixer.c | 6 ++---- src/main/version.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 9d1404eb07..44610f6393 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -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)) { diff --git a/src/main/version.h b/src/main/version.h index 9e353dbc44..5171f711a7 100644 --- a/src/main/version.h +++ b/src/main/version.h @@ -17,7 +17,7 @@ #define FC_VERSION_MAJOR 2 // increment when a major release is made (big new feature, etc) #define FC_VERSION_MINOR 5 // increment when a minor release is made (small new feature, change etc) -#define FC_VERSION_PATCH_LEVEL 1 // increment when a bug is fixed +#define FC_VERSION_PATCH_LEVEL 2 // increment when a bug is fixed #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x)