remove experimental csdr settings

This commit is contained in:
Jakob Ketterl 2021-02-11 22:51:50 +01:00
parent 690eed5d58
commit aad757df36
5 changed files with 2 additions and 46 deletions

View File

@ -277,12 +277,6 @@ waterfall_auto_level_margin = {"min": 3, "max": 10, "min_range": 50}
# using the auto squelch. # using the auto squelch.
#squelch_auto_margin = 10 # in dB #squelch_auto_margin = 10 # in dB
# === Experimental settings ===
# Warning! The settings below are very experimental.
csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr.
csdr_print_bufsizes = False # This prints the buffer sizes used for csdr processes.
csdr_through = False # Setting this True will print out how much data is going into the DSP chains.
nmux_memory = 50 # in megabytes. This sets the approximate size of the circular buffer used by nmux. nmux_memory = 50 # in megabytes. This sets the approximate size of the circular buffer used by nmux.
#google_maps_api_key = "" #google_maps_api_key = ""

View File

@ -95,9 +95,6 @@ class dsp(object):
self.decimation = None self.decimation = None
self.last_decimation = None self.last_decimation = None
self.nc_port = None self.nc_port = None
self.csdr_dynamic_bufsize = False
self.csdr_print_bufsizes = False
self.csdr_through = False
self.squelch_level = -150 self.squelch_level = -150
self.fft_averages = 50 self.fft_averages = 50
self.wfm_deemphasis_tau = 50e-6 self.wfm_deemphasis_tau = 50e-6
@ -142,10 +139,6 @@ class dsp(object):
def chain(self, which): def chain(self, which):
chain = ["nc -v 127.0.0.1 {nc_port}"] chain = ["nc -v 127.0.0.1 {nc_port}"]
if self.csdr_dynamic_bufsize:
chain += ["csdr setbuf {start_bufsize}"]
if self.csdr_through:
chain += ["csdr through"]
if which == "fft": if which == "fft":
chain += [ chain += [
"csdr fft_cc {fft_size} {fft_block_size}", "csdr fft_cc {fft_size} {fft_block_size}",
@ -384,10 +377,6 @@ class dsp(object):
) )
logger.debug("secondary command (demod) = %s", secondary_command_demod) logger.debug("secondary command (demod) = %s", secondary_command_demod)
my_env = os.environ.copy()
# if self.csdr_dynamic_bufsize: my_env["CSDR_DYNAMIC_BUFSIZE_ON"]="1";
if self.csdr_print_bufsizes:
my_env["CSDR_PRINT_BUFSIZES"] = "1"
if self.output.supports_type("secondary_fft"): if self.output.supports_type("secondary_fft"):
secondary_command_fft = " | ".join(self.secondary_chain("fft")) secondary_command_fft = " | ".join(self.secondary_chain("fft"))
secondary_command_fft = secondary_command_fft.format( secondary_command_fft = secondary_command_fft.format(
@ -400,7 +389,7 @@ class dsp(object):
logger.debug("secondary command (fft) = %s", secondary_command_fft) logger.debug("secondary command (fft) = %s", secondary_command_fft)
self.secondary_process_fft = subprocess.Popen( self.secondary_process_fft = subprocess.Popen(
secondary_command_fft, stdout=subprocess.PIPE, shell=True, start_new_session=True, env=my_env secondary_command_fft, stdout=subprocess.PIPE, shell=True, start_new_session=True
) )
self.output.send_output( self.output.send_output(
"secondary_fft", "secondary_fft",
@ -811,14 +800,9 @@ class dsp(object):
) )
logger.debug("Command = %s", command) logger.debug("Command = %s", command)
my_env = os.environ.copy()
if self.csdr_dynamic_bufsize:
my_env["CSDR_DYNAMIC_BUFSIZE_ON"] = "1"
if self.csdr_print_bufsizes:
my_env["CSDR_PRINT_BUFSIZES"] = "1"
out = subprocess.PIPE if self.output.supports_type("audio") else subprocess.DEVNULL out = subprocess.PIPE if self.output.supports_type("audio") else subprocess.DEVNULL
self.process = subprocess.Popen(command, stdout=out, shell=True, start_new_session=True, env=my_env) self.process = subprocess.Popen(command, stdout=out, shell=True, start_new_session=True)
def watch_thread(): def watch_thread():
rc = self.process.wait() rc = self.process.wait()
@ -862,10 +846,6 @@ class dsp(object):
self.output.send_output("meta", read_meta) self.output.send_output("meta", read_meta)
if self.csdr_dynamic_bufsize:
self.process.stdout.read(8) # dummy read to skip bufsize & preamble
logger.debug("Note: CSDR_DYNAMIC_BUFSIZE_ON = 1")
def stop(self): def stop(self):
with self.modification_lock: with self.modification_lock:
self.running = False self.running = False

View File

@ -285,12 +285,6 @@ defaultConfig = PropertyLayer(
waterfall_auto_level_margin={"min": 3, "max": 10, "min_range": 50}, waterfall_auto_level_margin={"min": 3, "max": 10, "min_range": 50},
frequency_display_precision=4, frequency_display_precision=4,
squelch_auto_margin=10, squelch_auto_margin=10,
# TODO: deprecated. remove from code.
csdr_dynamic_bufsize=False,
# TODO: deprecated. remove from code.
csdr_print_bufsizes=False,
# TODO: deprecated. remove from code.
csdr_through=False,
nmux_memory=50, nmux_memory=50,
google_maps_api_key="", google_maps_api_key="",
map_position_retention_time=2 * 60 * 60, map_position_retention_time=2 * 60 * 60,

View File

@ -65,9 +65,6 @@ class DspManager(csdr.output, SdrSourceEventClient):
"audio_compression", "audio_compression",
"fft_compression", "fft_compression",
"digimodes_fft_size", "digimodes_fft_size",
"csdr_dynamic_bufsize",
"csdr_print_bufsizes",
"csdr_through",
"digimodes_enable", "digimodes_enable",
"samp_rate", "samp_rate",
"digital_voice_unvoiced_quality", "digital_voice_unvoiced_quality",
@ -136,9 +133,6 @@ class DspManager(csdr.output, SdrSourceEventClient):
self.props.filter("center_freq", "offset_freq").wire(set_dial_freq), self.props.filter("center_freq", "offset_freq").wire(set_dial_freq),
] ]
self.dsp.csdr_dynamic_bufsize = self.props["csdr_dynamic_bufsize"]
self.dsp.csdr_print_bufsizes = self.props["csdr_print_bufsizes"]
self.dsp.csdr_through = self.props["csdr_through"]
self.dsp.set_temporary_directory(CoreConfig().get_temporary_directory()) self.dsp.set_temporary_directory(CoreConfig().get_temporary_directory())
if self.props["digimodes_enable"]: if self.props["digimodes_enable"]:

View File

@ -24,9 +24,6 @@ class SpectrumThread(csdr.output, SdrSourceEventClient):
"fft_fps", "fft_fps",
"fft_voverlap_factor", "fft_voverlap_factor",
"fft_compression", "fft_compression",
"csdr_dynamic_bufsize",
"csdr_print_bufsizes",
"csdr_through",
) )
self.dsp = dsp = csdr.dsp(self) self.dsp = dsp = csdr.dsp(self)
@ -55,9 +52,6 @@ class SpectrumThread(csdr.output, SdrSourceEventClient):
set_fft_averages() set_fft_averages()
dsp.csdr_dynamic_bufsize = props["csdr_dynamic_bufsize"]
dsp.csdr_print_bufsizes = props["csdr_print_bufsizes"]
dsp.csdr_through = props["csdr_through"]
dsp.set_temporary_directory(CoreConfig().get_temporary_directory()) dsp.set_temporary_directory(CoreConfig().get_temporary_directory())
logger.debug("Spectrum thread initialized successfully.") logger.debug("Spectrum thread initialized successfully.")