diff --git a/tnc/modem.py b/tnc/modem.py index 82ec99e6..6fa4b40a 100644 --- a/tnc/modem.py +++ b/tnc/modem.py @@ -970,8 +970,8 @@ class RF: static.HAMLIB_STATUS = self.hamlib.get_status() static.HAMLIB_ALC = self.hamlib.get_alc() static.HAMLIB_RF = self.hamlib.get_level() - static.HAMLIB_METER = self.hamlib.get_meter() - print(f"ALC: {static.HAMLIB_ALC}, RF: {static.HAMLIB_RF}, SWR: {static.HAMLIB_METER}") + static.HAMLIB_STRENGTH = self.hamlib.get_strength() + print(f"ALC: {static.HAMLIB_ALC}, RF: {static.HAMLIB_RF}, STRENGTH: {static.HAMLIB_STRENGTH}") def calculate_fft(self) -> None: """ Calculate an average signal strength of the channel to assess diff --git a/tnc/rigctld.py b/tnc/rigctld.py index 1487bb45..0daf3700 100644 --- a/tnc/rigctld.py +++ b/tnc/rigctld.py @@ -35,7 +35,7 @@ class radio: self.frequency = '' self.mode = '' self.alc = '' - self.meter = '' + self.strength = '' self.rf = '' def open_rig( @@ -217,20 +217,20 @@ class radio: except Exception: return self.rf - def get_meter(self): + def get_strength(self): try: - data = self.send_data_command(b"l METER", True) + data = self.send_data_command(b"l STRENGTH", True) data = data.split(b"\n") - meter = data[0].decode("utf-8") - if 'RPRT' not in meter: + strength = data[0].decode("utf-8") + if 'RPRT' not in strength: try: - self.meter = str(meter) + self.strength = str(strength) except ValueError: - self.meter = str(meter) + self.strength = str(strength) - return self.meter + return self.strength except Exception: - return self.meter + return self.strength def get_alc(self): try: diff --git a/tnc/sock.py b/tnc/sock.py index af476d63..6d8a1a4e 100644 --- a/tnc/sock.py +++ b/tnc/sock.py @@ -654,7 +654,7 @@ def send_tnc_state(): "snr": str(static.SNR), "frequency": str(static.HAMLIB_FREQUENCY), "rf_level": str(static.HAMLIB_RF), - "meter": str(static.HAMLIB_METER), + "strength": str(static.HAMLIB_STRENGTH), "alc": str(static.HAMLIB_ALC), "speed_level": str(static.ARQ_SPEED_LEVEL), "mode": str(static.HAMLIB_MODE), diff --git a/tnc/static.py b/tnc/static.py index 80ab4c82..c19ef813 100644 --- a/tnc/static.py +++ b/tnc/static.py @@ -66,7 +66,7 @@ HAMLIB_MODE: str = "" HAMLIB_BANDWIDTH: int = 0 HAMLIB_RF: int = 0 HAMLIB_ALC: int = 0 -HAMLIB_METER: int = 0 +HAMLIB_STRENGTH: int = 0 # ------------------------- # FreeDV Defaults