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