From 5a5c587100506888e0e06b85fa4e6b818aa6edbb Mon Sep 17 00:00:00 2001 From: Mashintime Date: Sun, 5 May 2024 09:47:18 -0400 Subject: [PATCH] Fix None response from STRENGTH --- freedata_server/rigctld.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freedata_server/rigctld.py b/freedata_server/rigctld.py index 9aecded5..b395c33b 100644 --- a/freedata_server/rigctld.py +++ b/freedata_server/rigctld.py @@ -295,8 +295,8 @@ class radio: def get_strength(self): try: - strength_response = int(self.send_command('l STRENGTH')) - self.parameters['strength'] = strength_response if strength_response is not None else 'err' + strength_response = self.send_command('l STRENGTH') + self.parameters['strength'] = int(strength_response) if strength_response is not None else 'err' except Exception as e: self.log.warning(f"Error getting strength: {e}") self.parameters['strength'] = 'err'