update remote device input field behaviour

This commit is contained in:
Jakob Ketterl 2021-07-05 12:58:16 +02:00
parent 0039d5fdcb
commit 6a59369c62
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,6 @@
from owrx.form.input import Input, CheckboxInput, DropdownInput, DropdownEnum, TextInput from owrx.form.input import Input, CheckboxInput, DropdownInput, DropdownEnum, TextInput
from owrx.form.input.converter import OptionalConverter
from owrx.form.input.validator import RequiredValidator
from owrx.soapy import SoapySettings from owrx.soapy import SoapySettings
@ -169,7 +171,11 @@ class DirectSamplingInput(DropdownInput):
class RemoteInput(TextInput): class RemoteInput(TextInput):
def __init__(self): def __init__(self):
super().__init__( super().__init__(
"remote", "Remote IP and Port", infotext="Remote hostname or IP and port to connect to. Format = IP:Port" "remote",
"Remote IP and Port",
infotext="Remote hostname or IP and port to connect to. Format = IP:Port",
converter=OptionalConverter(),
validator=RequiredValidator(),
) )

View File

@ -1,6 +1,7 @@
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
from owrx.form.input import Input, TextInput from owrx.form.input import Input, TextInput
from owrx.form.input.device import RemoteInput from owrx.form.input.device import RemoteInput
from owrx.form.input.converter import OptionalConverter
from typing import List from typing import List
@ -28,7 +29,10 @@ class SoapyRemoteDeviceDescription(SoapyConnectorDeviceDescription):
return super().getInputs() + [ return super().getInputs() + [
RemoteInput(), RemoteInput(),
TextInput( TextInput(
"remote_driver", "Remote driver", infotext="SoapySDR driver to be used on the remote SoapySDRServer" "remote_driver",
"Remote driver",
infotext="SoapySDR driver to be used on the remote SoapySDRServer",
converter=OptionalConverter(),
), ),
] ]