int instead of str

This commit is contained in:
DJ2LS 2024-04-26 21:14:53 +02:00
parent 412a797a9c
commit c5700e6e88
2 changed files with 5 additions and 5 deletions

View file

@ -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}")

View file

@ -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):