openwebrx/owrx/source/hackrf.py

27 lines
787 B
Python
Raw Normal View History

from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
from owrx.form import Input
from owrx.form.device import BiasTeeInput
from typing import List
2020-05-30 22:58:31 +02:00
class HackrfSource(SoapyConnectorSource):
2020-05-30 23:03:43 +02:00
def getSoapySettingsMappings(self):
mappings = super().getSoapySettingsMappings()
mappings.update({"bias_tee": "bias_tx"})
return mappings
2020-05-30 22:58:31 +02:00
def getDriver(self):
2021-01-20 17:01:46 +01:00
return "hackrf"
2021-02-20 18:09:24 +01:00
class HackrfDeviceDescription(SoapyConnectorDeviceDescription):
def getInputs(self) -> List[Input]:
return super().getInputs() + [BiasTeeInput()]
def getOptionalKeys(self):
return super().getOptionalKeys() + ["bias_tee"]
# TODO: find actual gain stages for hackrf
# def getGainStages(self):
# return None