From 0e64f15e650aff6acbf8cf5f43aff084009d1c97 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 20 Feb 2021 17:54:19 +0100 Subject: [PATCH] add more device inputs --- owrx/source/__init__.py | 11 +++++++++++ owrx/source/connector.py | 11 +++++++++-- owrx/source/soapy.py | 5 +++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/owrx/source/__init__.py b/owrx/source/__init__.py index 6324235..2ea6eca 100644 --- a/owrx/source/__init__.py +++ b/owrx/source/__init__.py @@ -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.
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): diff --git a/owrx/source/connector.py b/owrx/source/connector.py index f757d7c..40fd795 100644 --- a/owrx/source/connector.py +++ b/owrx/source/connector.py @@ -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.
" + "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), + ), ], ) diff --git a/owrx/source/soapy.py b/owrx/source/soapy.py index 7603402..8e4778b 100644 --- a/owrx/source/soapy.py +++ b/owrx/source/soapy.py @@ -98,6 +98,11 @@ class SoapyConnectorDeviceDescription(ConnectorDeviceDescription): "Device Gain", gain_stages=self.getGainStages(), ), + TextInput( + "antenna", + "Antenna", + converter=OptionalConverter(), + ), ], )