Bugfix: Working on SDR RX

This commit is contained in:
Logan Cusano
2022-01-04 00:30:31 -05:00
parent a0e05d0360
commit b7fca9d506

View File

@@ -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()