Oops only 3D Mode needs this

This commit is contained in:
borisbstyle 2016-03-10 00:35:19 +01:00
parent fa63ab52e1
commit 1e8f2bacb8
2 changed files with 6 additions and 1 deletions

View File

@ -280,7 +280,7 @@ void annexCode(void)
tmp2 = tmp / 100;
rcCommand[THROTTLE] = lookupThrottleRC[tmp2] + (tmp - tmp2 * 100) * (lookupThrottleRC[tmp2 + 1] - lookupThrottleRC[tmp2]) / 100; // [0;1000] -> expo -> [MINTHROTTLE;MAXTHROTTLE]
if (IS_RC_MODE_ACTIVE(BOX3DDISABLESWITCH) && !failsafeIsActive()) {
if (feature(FEATURE_3D) && IS_RC_MODE_ACTIVE(BOX3DDISABLESWITCH) && !failsafeIsActive()) {
fix12_t throttleScaler = qConstruct(rcCommand[THROTTLE] - 1000, 1000);
rcCommand[THROTTLE] = masterConfig.rxConfig.midrc + qMultiply(throttleScaler, PWM_RANGE_MAX - masterConfig.rxConfig.midrc);
}

5
testThrottle.c.save Normal file
View File

@ -0,0 +1,5 @@
#include "stdint.h"
#include "stdio.h"
int main()