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
+2 -2
View File
@@ -61,8 +61,8 @@ InputEditAdvanced::InputEditAdvanced(uint8_t input_n, uint8_t index) :
line = form->newLine(&grid);
new StaticText(line, rect_t{}, STR_TRIM, 0, COLOR_THEME_PRIMARY1);
auto c = new Choice(line, rect_t{}, STR_VMIXTRIMS, -TRIM_OFF,
-TRIM_LAST, GET_VALUE(-input->carryTrim),
SET_VALUE(input->carryTrim, -newValue));
-TRIM_LAST, GET_VALUE(-input->trimSource),
SET_VALUE(input->trimSource, -newValue));
c->setAvailableHandler([=](int value) {
return value != TRIM_ON || input->srcRaw <= MIXSRC_Ail;
});
+2 -2
View File
@@ -143,8 +143,8 @@ InputSource::InputSource(Window* parent, ExpoData* input) :
void InputSource::update()
{
if (input->srcRaw > MIXSRC_Ail && input->carryTrim == TRIM_ON) {
input->carryTrim = TRIM_OFF;
if (input->srcRaw > MIXSRC_Ail && input->trimSource == TRIM_ON) {
input->trimSource = TRIM_OFF;
}
if (!sensor_form) return;