+6
-6
@@ -527,13 +527,13 @@ int getStickTrimValue(int stick, int stickValue)
|
||||
return 0;
|
||||
|
||||
int trim = trims[stick];
|
||||
if (stick == THR_STICK) {
|
||||
if (g_model.thrTrim) {
|
||||
int trimMin = g_model.extendedTrims ? 2*TRIM_EXTENDED_MIN : 2*TRIM_MIN;
|
||||
trim = ((g_model.throttleReversed ? (trim+trimMin) : (trim-trimMin)) * (RESX-stickValue)) >> (RESX_SHIFT+1);
|
||||
}
|
||||
if (g_model.throttleReversed) {
|
||||
uint8_t thrTrimSw = g_model.getThrottleStickTrimSource() - MIXSRC_FIRST_TRIM;
|
||||
if (stick == thrTrimSw) {
|
||||
if (g_model.throttleReversed)
|
||||
trim = -trim;
|
||||
if (g_model.thrTrim) {
|
||||
trim = (g_model.extendedTrims) ? 2*TRIM_EXTENDED_MAX + trim : 2*TRIM_MAX + trim;
|
||||
trim = trim * (1024 - stickValue) / (2*RESX);
|
||||
}
|
||||
}
|
||||
return trim;
|
||||
|
||||
Reference in New Issue
Block a user