From b7fca9d506bad12d84f25f8da12afd50b12aca02 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Tue, 4 Jan 2022 00:30:31 -0500 Subject: [PATCH] Bugfix: Working on SDR RX --- gqrxHandler.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gqrxHandler.py b/gqrxHandler.py index 92a7e22..d5142d5 100644 --- a/gqrxHandler.py +++ b/gqrxHandler.py @@ -11,29 +11,27 @@ class GQRXHandler(): print("Creating connection") tel_conn = Telnet(self.hostname, self.port) tel_conn.open(self.hostname, self.port) - print(tel_conn) - print(tel_conn.read_until(b"Escape character is '^]'.", timeout=15)) return tel_conn def change_freq(self, freq): tel_conn = self.create_telnet_connection() print(f"Changing freq to {freq}") - tel_conn.write(f"F {int(freq)}") + tel_conn.write(bytes(f"F {int(freq)}", 'utf-8')) tel_conn.read_all() tel_conn.close() def change_squelch(self, squelch): tel_conn = self.create_telnet_connection() print(f"Changing squelch to {squelch}") - tel_conn.write(f"L SQL {float(squelch)}") + tel_conn.write(bytes(f"L SQL {float(squelch)}", 'utf-8')) tel_conn.read_all() tel_conn.close() def change_mode(self, mode): tel_conn = self.create_telnet_connection() print(f"Changing mode to {mode}") - tel_conn.write(f"M {bytes(str(mode), 'utf-8')}") + tel_conn.write(bytes(f"M {str(mode)}", 'utf-8')) tel_conn.read_all() tel_conn.close()