Merge with latest 2.3
This commit is contained in:
+7
-6
@@ -524,13 +524,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;
|
||||
@@ -956,6 +956,7 @@ void evalMixes(uint8_t tick10ms)
|
||||
// must be done before limits because of the applyLimit function: it checks for safety switches which would be not initialized otherwise
|
||||
if (tick10ms) {
|
||||
requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
|
||||
requiredBacklightBright = g_eeGeneral.backlightBright;
|
||||
|
||||
if (!g_model.noGlobalFunctions) {
|
||||
evalFunctions(g_eeGeneral.customFn, globalFunctionsContext);
|
||||
|
||||
Reference in New Issue
Block a user