fix(lua): Remove faulty carryTrim, replace with trimSource (#2995)

* Fix carryTrim in LUA

* Remove carryTrim
This commit is contained in:
3djc
2023-01-15 11:54:57 +10:00
committed by GitHub
parent ea162d2158
commit 8ee73a5800
10 changed files with 32 additions and 31 deletions
+3 -3
View File
@@ -151,11 +151,11 @@ void menuModelExpoOne(event_t event)
case EXPO_FIELD_TRIM:
uint8_t notStick = (ed->srcRaw > MIXSRC_Ail);
int8_t carryTrim = -ed->carryTrim;
int8_t trimSource = -ed->trimSource;
lcdDrawTextAlignedLeft(y, STR_TRIM);
lcdDrawTextAtIndex(EXPO_ONE_2ND_COLUMN, y, STR_VMIXTRIMS, (notStick && carryTrim == 0) ? 0 : carryTrim+1, RIGHT | (menuHorizontalPosition==0 ? attr : 0));
lcdDrawTextAtIndex(EXPO_ONE_2ND_COLUMN, y, STR_VMIXTRIMS, (notStick && trimSource == 0) ? 0 : trimSource + 1, RIGHT | (menuHorizontalPosition==0 ? attr : 0));
if (attr)
ed->carryTrim = -checkIncDecModel(event, carryTrim, notStick ? TRIM_ON : -TRIM_OFF, -TRIM_LAST);
ed->trimSource = -checkIncDecModel(event, trimSource, notStick ? TRIM_ON : -TRIM_OFF, -TRIM_LAST);
break;
}
y += FH;