openwebrx/owrx/source/hackrf.py

19 lines
553 B
Python
Raw Normal View History

2019-12-28 00:26:45 +01:00
from .direct import DirectSource
2020-04-10 20:05:06 +02:00
from owrx.command import Option
2019-12-28 00:26:45 +01:00
class HackrfSource(DirectSource):
2019-12-31 19:14:05 +01:00
def getCommandMapper(self):
return super().getCommandMapper().setBase("hackrf_transfer").setMappings(
2019-12-28 01:24:07 +01:00
{
"samp_rate": Option("-s"),
"tuner_freq": Option("-f"),
"rf_gain": Option("-g"),
"lna_gain": Option("-l"),
"rf_amp": Option("-a"),
}
).setStatic("-r-")
2019-12-28 00:26:45 +01:00
def getFormatConversion(self):
2019-12-28 16:44:45 +01:00
return ["csdr convert_s8_f"]