Using a list with extend instead of append

This commit is contained in:
Logan Cusano
2022-03-27 13:00:31 -04:00
parent 61f113c475
commit 492026ed8c

View File

@@ -51,29 +51,30 @@ 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",
p25_kwargs = [f"{self.OP25Dir}./rx.py", "--args", "rtl", "-N", "LNA:49", "-s", "200000", "-o", "25600", "-U", "-f",
f"{self.Frequency}e6", "-X", "-2"]
#p25_kwargs = f"{self.OP25Dir}/rx.py --args rtl -N LNA:49 -s 200000 -o 25600 -U -f {self.Frequency}e6 -X -2"
p25_stdout = subprocess.DEVNULL
p25_stderr = subprocess.STDOUT
#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)
#cwd = os.getcwd()
#os.chdir(self.OP25Dir)
if self.HTTP_ENABLED:
p25_kwargs.extend(["-l", "http:0.0.0.0:8080"])
#p25_kwargs += " -l http:0.0.0.0:8080"
p25_stdout = subprocess.STDOUT
#p25_stdout = subprocess.STDOUT
print(p25_kwargs)
self.OP25Proc = subprocess.Popen(p25_kwargs, shell=False, stdout=p25_stdout, stderr=p25_stderr)
self.OP25Proc = subprocess.Popen(p25_kwargs, shell=False, stdout=subprocess.STDOUT, stderr=subprocess.STDOUT,
cwd=self.OP25Dir)
os.chdir(cwd)
#os.chdir(cwd)
def close_op25(self):
print(f"Closing OP25")