@@ -231,20 +231,24 @@ class InputEditWindow : public Page
|
|||||||
|
|
||||||
// Source
|
// Source
|
||||||
new StaticText(window, grid.getLabelSlot(), STR_SOURCE, 0, COLOR_THEME_PRIMARY1);
|
new StaticText(window, grid.getLabelSlot(), STR_SOURCE, 0, COLOR_THEME_PRIMARY1);
|
||||||
new SourceChoice(window, grid.getFieldSlot(), INPUTSRC_FIRST, INPUTSRC_LAST,
|
Choice *src = new SourceChoice(
|
||||||
GET_DEFAULT(line->srcRaw),
|
window, grid.getFieldSlot(), INPUTSRC_FIRST, INPUTSRC_LAST,
|
||||||
[=] (int32_t newValue) {
|
GET_DEFAULT(line->srcRaw), [=](int32_t newValue) {
|
||||||
line->srcRaw = newValue;
|
line->srcRaw = newValue;
|
||||||
if (line->srcRaw > MIXSRC_Ail && line->carryTrim == TRIM_ON) {
|
if (line->srcRaw > MIXSRC_Ail && line->carryTrim == TRIM_ON) {
|
||||||
line->carryTrim = TRIM_OFF;
|
line->carryTrim = TRIM_OFF;
|
||||||
trimChoice->invalidate();
|
trimChoice->invalidate();
|
||||||
}
|
}
|
||||||
SET_DIRTY();
|
SET_DIRTY();
|
||||||
}
|
});
|
||||||
);
|
src->setAvailableHandler(
|
||||||
|
[](int v) { return isSourceAvailableInInputs(v); });
|
||||||
|
|
||||||
/* TODO telemetry current value
|
/* TODO telemetry current value
|
||||||
if (ed->srcRaw >= MIXSRC_FIRST_TELEM) {
|
if (ed->srcRaw >= MIXSRC_FIRST_TELEM) {
|
||||||
drawSensorCustomValue(EXPO_ONE_2ND_COLUMN+75, y, (ed->srcRaw - MIXSRC_FIRST_TELEM)/3, convertTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1, ed->scale), LEFT|(menuHorizontalPosition==1?attr:0));
|
drawSensorCustomValue(EXPO_ONE_2ND_COLUMN+75, y, (ed->srcRaw -
|
||||||
|
MIXSRC_FIRST_TELEM)/3, convertTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM +
|
||||||
|
1, ed->scale), LEFT|(menuHorizontalPosition==1?attr:0));
|
||||||
} */
|
} */
|
||||||
grid.nextLine();
|
grid.nextLine();
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ SourceChoice::SourceChoice(FormGroup *parent, const rect_t &rect, int16_t vmin,
|
|||||||
|
|
||||||
return std::string(getSourceString(value));
|
return std::string(getSourceString(value));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setAvailableHandler([](int v){ return isSourceAvailable(v); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceChoice::fillMenu(Menu *menu,
|
void SourceChoice::fillMenu(Menu *menu,
|
||||||
|
|||||||
Reference in New Issue
Block a user