From 6fd30b9609f503e329f63119fda708999af80b60 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 27 Mar 2022 04:37:29 -0400 Subject: [PATCH] Updated p25 opening --- op25Handler.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/op25Handler.py b/op25Handler.py index 0e39891..0d0412e 100644 --- a/op25Handler.py +++ b/op25Handler.py @@ -51,22 +51,21 @@ class OP25Handler(threading.Thread): if self.OP25Proc is not None: self.close_op25() + p25_kwargs = ["./rx.py", "--args", "rtl", "-N", "LNA:49", "-s", "200000", "-o", "25600", "-U", "-f", + f"{self.Frequency}e6", "-X", "-2"] + p25_stdout = subprocess.DEVNULL + p25_stderr = subprocess.STDOUT + print(f"Starting OP25") - + # Change the interpreter's working directory (idr why) cwd = os.getcwd() - os.chdir(self.OP25Dir) if self.HTTP_ENABLED: - self.OP25Proc = subprocess.Popen([f"./rx.py", "--args", "rtl", "-N", "LNA:49", "-s", - "200000", "-o", "25600", "-U", "-f", f"{self.Frequency}e6", "-X", "-2", - "-l" "http:0.0.0.0:8080"], shell=False, stdout=subprocess.DEVNULL, - stderr=subprocess.STDOUT) + p25_kwargs.append(["-l", "http:0.0.0.0:8080"]) + p25_stdout = subprocess.STDOUT - else: - self.OP25Proc = subprocess.Popen([f"./rx.py", "--args", "rtl", "-N", "LNA:49", "-s", - "200000", "-o", "25600", "-U", "-f", f"{self.Frequency}e6", "-X", "-2"], - shell=False, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) + self.OP25Proc = subprocess.Popen(p25_kwargs, shell=False, stdout=p25_stdout, stderr=p25_stderr) os.chdir(cwd)