add more device inputs

This commit is contained in:
Jakob Ketterl 2021-02-20 17:54:19 +01:00
parent 058463a9b3
commit 0e64f15e65
3 changed files with 25 additions and 2 deletions

View File

@ -396,6 +396,17 @@ class SdrDeviceDescription(object):
converter=OptionalConverter(defaultFormValue=True),
),
GainInput("rf_gain", "Device gain"),
NumberInput(
"lfo_offset",
"Oscilator offset",
append="Hz",
infotext="Use this when the actual receiving frequency differs from the frequency to be tuned on the"
+ " device. <br/> Formula: Center frequency + oscillator offset = sdr tune frequency",
converter=OptionalConverter(),
),
NumberInput("waterfall_min_level", "Lowest waterfall level", append="dBFS", converter=OptionalConverter()),
NumberInput("waterfall_max_level", "Highest waterfall level", append="dBFS", converter=OptionalConverter()),
# TODO `schedule`
]
def mergeInputs(self, *args):

View File

@ -3,7 +3,7 @@ from owrx.socket import getAvailablePort
import socket
from owrx.command import Flag, Option
from typing import List
from owrx.form import Input, NumberInput
from owrx.form import Input, NumberInput, CheckboxInput
from owrx.form.converter import OptionalConverter, IntConverter
import logging
@ -86,6 +86,13 @@ class ConnectorDeviceDescription(SdrDeviceDescription):
+ "Note: Port is only available on the local machine, not on the network.<br />"
+ "Note: IQ data may be degraded by the downsampling process to 8 bits.",
converter=OptionalConverter(IntConverter()),
)
),
CheckboxInput(
"iqswap",
"",
checkboxText="Swap I and Q channels",
infotext="Swapping inverts the spectrum, so this is useful in combination with an inverting mixer",
converter=OptionalConverter(defaultFormValue=False),
),
],
)

View File

@ -98,6 +98,11 @@ class SoapyConnectorDeviceDescription(ConnectorDeviceDescription):
"Device Gain",
gain_stages=self.getGainStages(),
),
TextInput(
"antenna",
"Antenna",
converter=OptionalConverter(),
),
],
)