Bugfix: Working on SDR RX

This commit is contained in:
Logan Cusano
2022-01-04 00:35:28 -05:00
parent 521ab15448
commit 769da28223
2 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
from telnetlib import Telnet
from BotResources import check_negative
class GQRXHandler():
def __init__(self, hostname: str = "localhost", port: int = 7356):
@@ -23,6 +24,10 @@ class GQRXHandler():
def change_squelch(self, squelch):
tel_conn = self.create_telnet_connection()
print(f"Changing squelch to {squelch}")
print(f"Squelch = {squelch}")
if not check_negative(squelch):
squelch = float(-abs(squelch))
print(f"Squelch = {squelch}")
tel_conn.write(bytes(f"L SQL {float(squelch)}", 'utf-8'))
tel_conn.close()