Merge branch 'develop' into radioberry

This commit is contained in:
Jakob Ketterl
2020-06-01 18:27:44 +02:00
66 changed files with 1247 additions and 710 deletions

View File

@ -1,23 +1,11 @@
from .direct import DirectSource
from owrx.command import Option
import time
from .soapy import SoapyConnectorSource
class HackrfSource(DirectSource):
def getCommandMapper(self):
return super().getCommandMapper().setBase("hackrf_transfer").setMappings(
{
"samp_rate": Option("-s"),
"tuner_freq": Option("-f"),
"rf_gain": Option("-g"),
"lna_gain": Option("-l"),
"rf_amp": Option("-a"),
"ppm": Option("-C"),
}
).setStatic("-r-")
class HackrfSource(SoapyConnectorSource):
def getSoapySettingsMappings(self):
mappings = super().getSoapySettingsMappings()
mappings.update({"bias_tee": "bias_tx"})
return mappings
def getFormatConversion(self):
return ["csdr convert_s8_f"]
def sleepOnRestart(self):
time.sleep(1)
def getDriver(self):
return "hackrf"

View File

@ -1,10 +1,4 @@
from .direct import DirectSource
from . import SdrSource
import subprocess
import threading
import os
import socket
import time
import logging
@ -29,7 +23,7 @@ class Resampler(DirectSource):
def getCommand(self):
return [
"nc -v 127.0.0.1 {nc_port}".format(nc_port=self.sdr.getPort()),
"csdr shift_addition_cc {shift}".format(shift=self.shift),
"csdr shift_addfast_cc {shift}".format(shift=self.shift),
"csdr fir_decimate_cc {decimation} {ddc_transition_bw} HAMMING".format(
decimation=self.decimation, ddc_transition_bw=self.transition_bw
),