openwebrx-clone/owrx/source/fifi_sdr.py

16 lines
526 B
Python
Raw Normal View History

2019-12-27 23:26:45 +00:00
from owrx.command import Option
from .direct import DirectSource
2019-12-27 23:26:45 +00:00
class FifiSdrSource(DirectSource):
def __init__(self, id, props, port):
super().__init__(id, props, port)
2019-12-28 00:24:07 +00:00
self.getCommandMapper().setBase("arecord").setMappings(
{"device": Option("-D"), "samp_rate": Option("-r")}
).setStatic("-f S16_LE -c2 -")
2019-12-27 23:26:45 +00:00
def getEventNames(self):
2019-12-28 00:24:07 +00:00
return super().getEventNames() + ["device"]
def getFormatConversion(self):
2019-12-28 15:44:45 +00:00
return ["csdr convert_s16_f", "csdr gain_ff 30"]