mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
adjusted radio events
This commit is contained in:
parent
c0d0a98760
commit
6b78a7f42e
1 changed files with 3 additions and 4 deletions
|
@ -43,12 +43,12 @@ class radio:
|
|||
try:
|
||||
self.connection = socket.create_connection((self.hostname, self.port), timeout=self.timeout)
|
||||
self.connected = True
|
||||
self.states.set("radio_status", True)
|
||||
self.states.set_radio("radio_status", True)
|
||||
self.log.info(f"[RIGCTLD] Connected to rigctld at {self.hostname}:{self.port}")
|
||||
except Exception as err:
|
||||
self.log.warning(f"[RIGCTLD] Failed to connect to rigctld: {err}")
|
||||
self.connected = False
|
||||
self.states.set("radio_status", False)
|
||||
self.states.set_radio("radio_status", False)
|
||||
|
||||
def disconnect(self):
|
||||
self.connected = False
|
||||
|
@ -56,7 +56,7 @@ class radio:
|
|||
self.connection.close()
|
||||
del self.connection
|
||||
self.connection = None
|
||||
self.states.set("radio_status", False)
|
||||
self.states.set_radio("radio_status", False)
|
||||
self.parameters = {
|
||||
'frequency': '---',
|
||||
'mode': '---',
|
||||
|
@ -240,7 +240,6 @@ class radio:
|
|||
self.connected = False
|
||||
return False
|
||||
|
||||
|
||||
def get_parameters(self):
|
||||
if not self.connected:
|
||||
self.connect()
|
||||
|
|
Loading…
Reference in a new issue