From 2e47f38a8da721bc57848758869dd1d28323578c Mon Sep 17 00:00:00 2001 From: Alexander Sholohov Date: Sun, 29 Oct 2023 22:49:29 +0700 Subject: [PATCH 1/3] add channel selection to optional device parameters --- owrx/source/connector.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/owrx/source/connector.py b/owrx/source/connector.py index 7175d9b6..75c005ea 100644 --- a/owrx/source/connector.py +++ b/owrx/source/connector.py @@ -28,6 +28,7 @@ class ConnectorSource(SdrSource): "rtltcp_compat": Option("-r"), "ppm": Option("-P"), "rf_gain": Option("-g"), + "soapy_channel": Option("-n"), } ) ) @@ -87,10 +88,14 @@ class ConnectorDeviceDescription(SdrDeviceDescription): "Swap I and Q channels", infotext="Swapping inverts the spectrum, so this is useful in combination with an inverting mixer", ), + NumberInput( + "soapy_channel", + "Select SoapySDR Channel", + ), ] def getDeviceOptionalKeys(self): - return super().getDeviceOptionalKeys() + ["rtltcp_compat", "iqswap"] + return super().getDeviceOptionalKeys() + ["rtltcp_compat", "iqswap", "soapy_channel"] def getProfileOptionalKeys(self): return super().getProfileOptionalKeys() + ["iqswap"] From cde6f586f9c320f65098d67dd5ebcc7dcd7942f4 Mon Sep 17 00:00:00 2001 From: Alexander Sholohov Date: Fri, 5 Jan 2024 08:40:16 +0700 Subject: [PATCH 2/3] Revert "add channel selection to optional device parameters" This reverts commit 2e47f38a8da721bc57848758869dd1d28323578c. --- owrx/source/connector.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/owrx/source/connector.py b/owrx/source/connector.py index 75c005ea..7175d9b6 100644 --- a/owrx/source/connector.py +++ b/owrx/source/connector.py @@ -28,7 +28,6 @@ class ConnectorSource(SdrSource): "rtltcp_compat": Option("-r"), "ppm": Option("-P"), "rf_gain": Option("-g"), - "soapy_channel": Option("-n"), } ) ) @@ -88,14 +87,10 @@ class ConnectorDeviceDescription(SdrDeviceDescription): "Swap I and Q channels", infotext="Swapping inverts the spectrum, so this is useful in combination with an inverting mixer", ), - NumberInput( - "soapy_channel", - "Select SoapySDR Channel", - ), ] def getDeviceOptionalKeys(self): - return super().getDeviceOptionalKeys() + ["rtltcp_compat", "iqswap", "soapy_channel"] + return super().getDeviceOptionalKeys() + ["rtltcp_compat", "iqswap"] def getProfileOptionalKeys(self): return super().getProfileOptionalKeys() + ["iqswap"] From 9a5313f4feaf4004457ec4dfaf62854ce2dabcf7 Mon Sep 17 00:00:00 2001 From: Alexander Sholohov Date: Fri, 5 Jan 2024 08:46:12 +0700 Subject: [PATCH 3/3] add channel selection to optional device parameters for soapy devices --- owrx/source/soapy.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/owrx/source/soapy.py b/owrx/source/soapy.py index 745343c6..35ad0764 100644 --- a/owrx/source/soapy.py +++ b/owrx/source/soapy.py @@ -2,7 +2,7 @@ from abc import ABCMeta, abstractmethod from owrx.command import Option from owrx.source.connector import ConnectorSource, ConnectorDeviceDescription from typing import List -from owrx.form.input import Input, TextInput +from owrx.form.input import Input, NumberInput, TextInput from owrx.form.input.device import GainInput from owrx.soapy import SoapySettings @@ -17,6 +17,7 @@ class SoapyConnectorSource(ConnectorSource, metaclass=ABCMeta): { "antenna": Option("-a"), "soapy_settings": Option("-t"), + "soapy_channel": Option("-n"), } ) ) @@ -96,10 +97,14 @@ class SoapyConnectorDeviceDescription(ConnectorDeviceDescription): has_agc=self.hasAgc(), ), TextInput("antenna", "Antenna"), + NumberInput( + "soapy_channel", + "Select SoapySDR Channel", + ), ] def getDeviceOptionalKeys(self): - return super().getDeviceOptionalKeys() + ["device", "rf_gain", "antenna"] + return super().getDeviceOptionalKeys() + ["device", "rf_gain", "antenna", "soapy_channel"] def getProfileOptionalKeys(self): return super().getProfileOptionalKeys() + ["antenna"]