User controllable serial port power.

Thx to @raphaelcoeffic for numerous tips with YAML.
Tested with TX16S mkII.
This commit is contained in:
rotorman
2022-04-18 13:19:33 +02:00
parent f39f7a87ed
commit b1a3bc834f
22 changed files with 115 additions and 59 deletions
+14
View File
@@ -235,6 +235,20 @@ class SerialConfigWindow : public FormGroup
aux->setAvailableHandler(
[=](int value) { return isSerialModeAvailable(port_nr, value); });
grid.nextLine();
if (port_nr < SP_VCP)
{
new StaticText(this, grid.getLabelSlot(), "Port power:", 0, COLOR_THEME_PRIMARY1);
new CheckBox(
this, grid.getFieldSlot(1, 0),
[=] { return serialGetPower(port_nr); },
[=](int32_t newValue) {
serialSetPower(port_nr, newValue);
SET_DIRTY();
}
);
grid.nextLine();
}
}
if (display_ttl_warning) {