moved from meter to strength

This commit is contained in:
DJ2LS 2023-01-30 12:31:34 +01:00
parent 87fb4382a4
commit 62792e75bb
4 changed files with 13 additions and 13 deletions

View file

@ -970,8 +970,8 @@ class RF:
static.HAMLIB_STATUS = self.hamlib.get_status() static.HAMLIB_STATUS = self.hamlib.get_status()
static.HAMLIB_ALC = self.hamlib.get_alc() static.HAMLIB_ALC = self.hamlib.get_alc()
static.HAMLIB_RF = self.hamlib.get_level() static.HAMLIB_RF = self.hamlib.get_level()
static.HAMLIB_METER = self.hamlib.get_meter() static.HAMLIB_STRENGTH = self.hamlib.get_strength()
print(f"ALC: {static.HAMLIB_ALC}, RF: {static.HAMLIB_RF}, SWR: {static.HAMLIB_METER}") print(f"ALC: {static.HAMLIB_ALC}, RF: {static.HAMLIB_RF}, STRENGTH: {static.HAMLIB_STRENGTH}")
def calculate_fft(self) -> None: def calculate_fft(self) -> None:
""" """
Calculate an average signal strength of the channel to assess Calculate an average signal strength of the channel to assess

View file

@ -35,7 +35,7 @@ class radio:
self.frequency = '' self.frequency = ''
self.mode = '' self.mode = ''
self.alc = '' self.alc = ''
self.meter = '' self.strength = ''
self.rf = '' self.rf = ''
def open_rig( def open_rig(
@ -217,20 +217,20 @@ class radio:
except Exception: except Exception:
return self.rf return self.rf
def get_meter(self): def get_strength(self):
try: try:
data = self.send_data_command(b"l METER", True) data = self.send_data_command(b"l STRENGTH", True)
data = data.split(b"\n") data = data.split(b"\n")
meter = data[0].decode("utf-8") strength = data[0].decode("utf-8")
if 'RPRT' not in meter: if 'RPRT' not in strength:
try: try:
self.meter = str(meter) self.strength = str(strength)
except ValueError: except ValueError:
self.meter = str(meter) self.strength = str(strength)
return self.meter return self.strength
except Exception: except Exception:
return self.meter return self.strength
def get_alc(self): def get_alc(self):
try: try:

View file

@ -654,7 +654,7 @@ def send_tnc_state():
"snr": str(static.SNR), "snr": str(static.SNR),
"frequency": str(static.HAMLIB_FREQUENCY), "frequency": str(static.HAMLIB_FREQUENCY),
"rf_level": str(static.HAMLIB_RF), "rf_level": str(static.HAMLIB_RF),
"meter": str(static.HAMLIB_METER), "strength": str(static.HAMLIB_STRENGTH),
"alc": str(static.HAMLIB_ALC), "alc": str(static.HAMLIB_ALC),
"speed_level": str(static.ARQ_SPEED_LEVEL), "speed_level": str(static.ARQ_SPEED_LEVEL),
"mode": str(static.HAMLIB_MODE), "mode": str(static.HAMLIB_MODE),

View file

@ -66,7 +66,7 @@ HAMLIB_MODE: str = ""
HAMLIB_BANDWIDTH: int = 0 HAMLIB_BANDWIDTH: int = 0
HAMLIB_RF: int = 0 HAMLIB_RF: int = 0
HAMLIB_ALC: int = 0 HAMLIB_ALC: int = 0
HAMLIB_METER: int = 0 HAMLIB_STRENGTH: int = 0
# ------------------------- # -------------------------
# FreeDV Defaults # FreeDV Defaults