({
gpio_chips: [],
usb_relays: [],
+ serial_ports: [],
})
// Encoder backend
@@ -1175,12 +1178,14 @@ async function saveAtxConfig() {
device: atxConfig.value.power.device || undefined,
pin: atxConfig.value.power.pin,
active_level: atxConfig.value.power.active_level,
+ baud_rate: atxConfig.value.power.baud_rate,
},
reset: {
driver: atxConfig.value.reset.driver,
device: atxConfig.value.reset.device || undefined,
pin: atxConfig.value.reset.pin,
active_level: atxConfig.value.reset.active_level,
+ baud_rate: atxConfig.value.reset.baud_rate,
},
led: {
enabled: atxConfig.value.led.enabled,
@@ -1202,6 +1207,8 @@ async function saveAtxConfig() {
function getAtxDevicesForDriver(driver: string): string[] {
if (driver === 'gpio') {
return atxDevices.value.gpio_chips
+ } else if (driver === 'serial') {
+ return atxDevices.value.serial_ports
} else if (driver === 'usbrelay') {
return atxDevices.value.usb_relays
}
@@ -2474,6 +2481,7 @@ watch(() => config.value.hid_backend, async () => {
{{ t('settings.atxDriverNone') }}
{{ t('settings.atxDriverGpio') }}
{{ t('settings.atxDriverUsbRelay') }}
+ Serial (LCUS)
@@ -2486,7 +2494,7 @@ watch(() => config.value.hid_backend, async () => {
- {{ atxConfig.power.driver === 'usbrelay' ? t('settings.atxChannel') : t('settings.atxPin') }}
+ {{ ['usbrelay', 'serial'].includes(atxConfig.power.driver) ? t('settings.atxChannel') : t('settings.atxPin') }}
@@ -2496,6 +2504,16 @@ watch(() => config.value.hid_backend, async () => {
{{ t('settings.atxLevelLow') }}
+
+ {{ t('settings.baudRate') }}
+
+ 9600
+ 19200
+ 38400
+ 57600
+ 115200
+
+
@@ -2514,6 +2532,7 @@ watch(() => config.value.hid_backend, async () => {
{{ t('settings.atxDriverNone') }}
{{ t('settings.atxDriverGpio') }}
{{ t('settings.atxDriverUsbRelay') }}
+ Serial (LCUS)
@@ -2526,7 +2545,7 @@ watch(() => config.value.hid_backend, async () => {
- {{ atxConfig.reset.driver === 'usbrelay' ? t('settings.atxChannel') : t('settings.atxPin') }}
+ {{ ['usbrelay', 'serial'].includes(atxConfig.reset.driver) ? t('settings.atxChannel') : t('settings.atxPin') }}
@@ -2536,6 +2555,16 @@ watch(() => config.value.hid_backend, async () => {
{{ t('settings.atxLevelLow') }}
+
+ {{ t('settings.baudRate') }}
+
+ 9600
+ 19200
+ 38400
+ 57600
+ 115200
+
+