mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 00:05:17 +03:00
Fixes #1494
This commit is contained in:
parent
4d945b5d95
commit
c1d789d004
1 changed files with 1 additions and 5 deletions
|
@ -1656,11 +1656,7 @@ FORCEINLINE void evalTrims()
|
||||||
// do trim -> throttle trim if applicable
|
// do trim -> throttle trim if applicable
|
||||||
int16_t trim = getTrimValue(phase, i);
|
int16_t trim = getTrimValue(phase, i);
|
||||||
if (i==THR_STICK && g_model.thrTrim) {
|
if (i==THR_STICK && g_model.thrTrim) {
|
||||||
if (g_model.throttleReversed)
|
trim = (((g_model.throttleReversed)?(int32_t)(trim+TRIM_MIN):(int32_t)(trim-TRIM_MIN)) * (RESX-getValue(MIXSRC_Thr))) >> (RESX_SHIFT+1);
|
||||||
trim = -trim;
|
|
||||||
int16_t v = getValue(MIXSRC_Thr);
|
|
||||||
int32_t vv = ((int32_t)trim-TRIM_MIN)*(RESX-v)>>(RESX_SHIFT+1);
|
|
||||||
trim = vv;
|
|
||||||
}
|
}
|
||||||
else if (trimsCheckTimer > 0) {
|
else if (trimsCheckTimer > 0) {
|
||||||
trim = 0;
|
trim = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue