From 6b78a7f42e02f5b42aa4a7fa5ac7fb075e04a67a Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Fri, 26 Apr 2024 20:50:22 +0200 Subject: [PATCH] adjusted radio events --- freedata_server/rigctld.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/freedata_server/rigctld.py b/freedata_server/rigctld.py index 047312b6..3fde21f9 100644 --- a/freedata_server/rigctld.py +++ b/freedata_server/rigctld.py @@ -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()