more refinements as per Jakob Ketterl suggestions
This commit is contained in:
@ -3,29 +3,37 @@ from owrx.command import Flag, Option
|
||||
|
||||
|
||||
#
|
||||
# perseustest -s 768000 -u 0 -f 14150000 -r-|csdr convert_s8_f|nmux --bufsize 192512 --bufcnt 260 --port 35989 --address 127.0.0.1
|
||||
# perseustest -a -t0 -o -
|
||||
# perseustest -d 9 -a -t 100000 -o - -s 768000 -u 0 -f 14150000 -r-
|
||||
# In order to interface Perseus hardware, we resolve to use the
|
||||
# perseustest utility that comes with libperseus-sdr support package.
|
||||
# Below the base options used are shown:
|
||||
#
|
||||
# -p output I/Q samples as 32 bits floating point
|
||||
# -d -1 suppress debug messages
|
||||
# -a don't test attenuators on startup
|
||||
# -t 0 runs indefinitely
|
||||
# -o - output samples on stdout
|
||||
#
|
||||
# As we are already returning I/Q samples as pairs of 32 bits
|
||||
# floating points (option -p),no need for further conversions,
|
||||
# so the method getFormatConversion(self) is not implemented at all.
|
||||
|
||||
class PerseussdrSource(DirectSource):
|
||||
def getCommandMapper(self):
|
||||
return super().getCommandMapper().setBase("perseustest -p -d -1 -a -t 100000 -o - ").setMappings(
|
||||
return super().getCommandMapper().setBase("perseustest -p -d -1 -a -t 0 -o - ").setMappings(
|
||||
{
|
||||
"samp_rate": Option("-s"),
|
||||
"tuner_freq": Option("-f"),
|
||||
"rf_gain": Option("-u"),
|
||||
"lna_gain": Option("-g"),
|
||||
"rf_amp": Option("-x"),
|
||||
"attenuator": Option("-u"),
|
||||
"adc_preamp": Option("-m"),
|
||||
"adc_dither": Option("-x"),
|
||||
"wideband": Option("-w"),
|
||||
}
|
||||
).setStatic("-r-")
|
||||
)
|
||||
|
||||
def getEventNames(self):
|
||||
return super().getEventNames() + [
|
||||
"lna_gain",
|
||||
"rf_amp",
|
||||
"attenuator",
|
||||
"adc_preamp",
|
||||
"adc_dither",
|
||||
"wideband",
|
||||
]
|
||||
|
||||
def getFormatConversion(self):
|
||||
# return ["csdr convert_s24_f --bigendian"]
|
||||
# return ["csdr convert_s24_f", "csdr gain_ff 20"]
|
||||
return ["csdr gain_ff 20"]
|
||||
|
Reference in New Issue
Block a user