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

Fix for the case of extended trims

Code cleanup
This commit is contained in:
Damjan Adamic 2014-07-31 15:47:32 +02:00
parent 21ae270c0e
commit 828372ab29
2 changed files with 4 additions and 7 deletions

View file

@ -1661,7 +1661,8 @@ FORCEINLINE void evalTrims()
int16_t trim = getTrimValue(phase, i);
#if !defined(PCBTARANIS)
if (i==THR_STICK && g_model.thrTrim) {
trim = (((g_model.throttleReversed)?(int32_t)(trim+TRIM_MIN):(int32_t)(trim-TRIM_MIN)) * (RESX-getValue(MIXSRC_Thr))) >> (RESX_SHIFT+1);
int16_t trimMin = g_model.extendedTrims ? TRIM_EXTENDED_MIN : TRIM_MIN;
trim = (((g_model.throttleReversed)?(int32_t)(trim+trimMin):(int32_t)(trim-trimMin)) * (RESX-getValue(MIXSRC_Thr))) >> (RESX_SHIFT+1);
}
#endif
if (trimsCheckTimer > 0) {