feat: add new proto configs

master
andrekir 2023-01-27 15:53:16 -03:00
rodzic 25387560ec
commit a49372c9ba
1 zmienionych plików z 23 dodań i 0 usunięć

Wyświetl plik

@ -457,6 +457,21 @@ fun DeviceSettingsItemList(viewModel: UIViewModel) {
})
}
item {
EditTextPreference(title = "rsyslog server",
value = networkInput.rsyslogServer,
enabled = connected && hasWifi,
isError = false,
keyboardOptions = KeyboardOptions.Default.copy(
keyboardType = KeyboardType.Uri, imeAction = ImeAction.Done
),
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
onValueChanged = { value ->
if (value.toByteArray().size <= 32) // rsyslog_server max_size:33
networkInput = networkInput.copy { rsyslogServer = value }
})
}
item {
SwitchPreference(title = "Ethernet enabled",
checked = networkInput.ethEnabled,
@ -753,6 +768,14 @@ fun DeviceSettingsItemList(viewModel: UIViewModel) {
})
}
item {
SwitchPreference(title = "SX126X RX boosted gain",
checked = loraInput.sx126XRxBoostedGain,
enabled = connected,
onCheckedChange = { loraInput = loraInput.copy { sx126XRxBoostedGain = it } })
}
item { Divider() }
item {
PreferenceFooter(
enabled = loraInput != localConfig.lora,