fix(lua): Remove faulty carryTrim, replace with trimSource (#2995)
* Fix carryTrim in LUA * Remove carryTrim
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user