Fixes #1569
This commit is contained in:
+4
-2
@@ -753,9 +753,11 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
|
||||
if (mix_trim == THR_STICK) {
|
||||
if (g_model.thrTrim) {
|
||||
if (g_model.throttleReversed) {
|
||||
trim = -trim;
|
||||
trim = ((int32_t)(trim+TRIM_MIN) * (RESX-v)) >> (RESX_SHIFT+1);
|
||||
}
|
||||
else {
|
||||
trim = ((int32_t)(trim-TRIM_MIN) * (RESX-v)) >> (RESX_SHIFT+1);
|
||||
}
|
||||
trim = ((trim-2*TRIM_MIN) * (RESX-v)) >> (RESX_SHIFT+1);
|
||||
}
|
||||
if (g_model.throttleReversed) {
|
||||
trim = -trim;
|
||||
|
||||
@@ -1661,11 +1661,7 @@ FORCEINLINE void evalTrims()
|
||||
int16_t trim = getTrimValue(phase, i);
|
||||
#if !defined(PCBTARANIS)
|
||||
if (i==THR_STICK && g_model.thrTrim) {
|
||||
if (g_model.throttleReversed)
|
||||
trim = -trim;
|
||||
int16_t v = anas[i];
|
||||
int32_t vv = ((int32_t)trim-TRIM_MIN)*(RESX-v)>>(RESX_SHIFT+1);
|
||||
trim = vv;
|
||||
trim = (((g_model.throttleReversed)?(int32_t)(trim+TRIM_MIN):(int32_t)(trim-TRIM_MIN)) * (RESX-getValue(MIXSRC_Thr))) >> (RESX_SHIFT+1);
|
||||
}
|
||||
#endif
|
||||
if (trimsCheckTimer > 0) {
|
||||
|
||||
Reference in New Issue
Block a user