From c6b50e81f98a50c24f2e9d714197b979c5bcd7fd Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sat, 12 Mar 2016 19:20:47 +0100 Subject: [PATCH] Probe I/Q server to see if it has started. --- openwebrx.py | 11 ++++++++++- plugins/dsp/csdr/plugin.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/openwebrx.py b/openwebrx.py index fc4240f..ebf409c 100755 --- a/openwebrx.py +++ b/openwebrx.py @@ -135,7 +135,16 @@ def main(): rtl_thread=threading.Thread(target = lambda:subprocess.Popen(cfg.start_rtl_command, shell=True), args=()) rtl_thread.start() print "[openwebrx-main] Started rtl_thread: "+cfg.start_rtl_command - time.sleep(1) #wait until it really starts + print "[openwebrx-main] Waiting for I/Q server to start..." + while True: + testsock=socket.socket() + try: testsock.connect(("127.0.0.1", cfg.iq_server_port)) + except: + time.sleep(0.1) + continue + testsock.close() + break + print "[openwebrx-main] I/Q server started." #Initialize clients clients=[] diff --git a/plugins/dsp/csdr/plugin.py b/plugins/dsp/csdr/plugin.py index ea5912e..c0a3997 100644 --- a/plugins/dsp/csdr/plugin.py +++ b/plugins/dsp/csdr/plugin.py @@ -56,7 +56,7 @@ class dsp_plugin: if self.csdr_through: any_chain_base+="csdr through | " any_chain_base+=self.format_conversion+(" | " if self.format_conversion!="" else "") ##"csdr flowcontrol {flowcontrol} auto 1.5 10 | " if which == "fft": - fft_chain_base = "sleep 1; "+any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | csdr logpower_cf -70 | csdr fft_exchange_sides_ff {fft_size}" + fft_chain_base = any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | csdr logpower_cf -70 | csdr fft_exchange_sides_ff {fft_size}" if self.fft_compression=="adpcm": return fft_chain_base+" | csdr compress_fft_adpcm_f_u8 {fft_size}" else: