From f92c49cee68519ea8dd676405f9252cb13ba61e1 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 28 Dec 2019 00:33:27 +0100 Subject: [PATCH] fix overlooked bias tee in airspy --- owrx/source/airspy.py | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/owrx/source/airspy.py b/owrx/source/airspy.py index 086d2f3..3882b34 100644 --- a/owrx/source/airspy.py +++ b/owrx/source/airspy.py @@ -1,25 +1,16 @@ +from owrx.command import Flag from .soapy import SoapyConnectorSource class AirspySource(SoapyConnectorSource): + def __init__(self, id, props, port): + super().__init__(id, props, port) + self.getCommandMapper().setMappings({ + "bias_tee": Flag("-t biastee=true") + }) + def getDriver(self): return "airspy" def getEventNames(self): return super().getEventNames() + ["bias_tee"] - - ''' - def getCommand(self): - cmd = [ - "soapy_connector -p {port} -c {controlPort}".format(port=self.port, controlPort=self.controlPort) - + ' -s {samp_rate} -f {tuner_freq} -g "{rf_gain}" -P {ppm} -d "{device}"' - ] - values = self.getCommandValues() - if values["iqswap"]: - cmd += " -i" - if self.rtlProps["rtltcp_compat"]: - cmd += " -r" - if values["bias_tee"]: - cmd += " -t biastee=true" - return cmd - '''