From 9a5313f4feaf4004457ec4dfaf62854ce2dabcf7 Mon Sep 17 00:00:00 2001 From: Alexander Sholohov Date: Fri, 5 Jan 2024 08:46:12 +0700 Subject: [PATCH] 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"]