Replaced arbitrary sleep with a wait until response on all functions
This commit is contained in:
@@ -26,12 +26,12 @@ class GQRXHandler():
|
||||
squelch = float(-abs(squelch))
|
||||
print(f"Changing squelch to {squelch}")
|
||||
self.tel_conn.write(bytes(f"L SQL {float(squelch)}", 'utf-8'))
|
||||
sleep(.5)
|
||||
self.tel_conn.read_until(b'RPRT 0')
|
||||
|
||||
def change_mode(self, mode):
|
||||
print(f"Changing mode to {mode}")
|
||||
self.tel_conn.write(bytes(f"M {str(mode)}", 'utf-8'))
|
||||
sleep(.5)
|
||||
self.tel_conn.read_until(b'RPRT 0')
|
||||
|
||||
def set_all_settings(self, mode, squelch, freq):
|
||||
self.change_squelch(0)
|
||||
|
||||
Reference in New Issue
Block a user