diff --git a/freedata_server/rigctld.py b/freedata_server/rigctld.py index 3fde21f9..f94e224e 100644 --- a/freedata_server/rigctld.py +++ b/freedata_server/rigctld.py @@ -256,7 +256,7 @@ class radio: def get_frequency(self): try: - frequency_response = self.send_command('f') + frequency_response = int(self.send_command('f')) self.parameters['frequency'] = frequency_response if frequency_response is not None else 'err' except Exception as e: self.log.warning(f"Error getting frequency: {e}") @@ -280,7 +280,7 @@ class radio: bandwidth = 'err' finally: self.parameters['mode'] = mode - self.parameters['bandwidth'] = bandwidth + self.parameters['bandwidth'] = int(bandwidth) def get_alc(self): try: @@ -292,7 +292,7 @@ class radio: def get_strength(self): try: - strength_response = self.send_command('l STRENGTH') + strength_response = int(self.send_command('l STRENGTH')) self.parameters['strength'] = strength_response if strength_response is not None else 'err' except Exception as e: self.log.warning(f"Error getting strength: {e}") diff --git a/freedata_server/state_manager.py b/freedata_server/state_manager.py index 38c48ae3..75f6f5e2 100644 --- a/freedata_server/state_manager.py +++ b/freedata_server/state_manager.py @@ -54,12 +54,12 @@ class StateManager: # Set rig control status regardless or rig control method self.radio_status = False - def sendState (self): + def sendState(self): currentState = self.get_state_event(False) self.statequeue.put(currentState) return currentState - def sendStateUpdate (self, state): + def sendStateUpdate(self, state): self.statequeue.put(state) def set(self, key, value):