From fe5e0b059554760eef6938abedc3d34bf5f82703 Mon Sep 17 00:00:00 2001 From: Mosleh Uddin Date: Tue, 30 Jul 2024 18:08:35 -0400 Subject: [PATCH] Update active port method for corrected gpio polarity. --- adi/fmc_4p_vna_cst2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adi/fmc_4p_vna_cst2.py b/adi/fmc_4p_vna_cst2.py index bf266a685..315be2248 100644 --- a/adi/fmc_4p_vna_cst2.py +++ b/adi/fmc_4p_vna_cst2.py @@ -82,7 +82,7 @@ def __init__(self, uri): @property def active_port(self) -> str: - # assume the enabled LED designates the active port + """ Return the active port """ return self.rfin_mux.select @@ -91,12 +91,12 @@ def active_port(self, port: str) -> None: """ Configure all dependencies to enable port """ # disable all other ports and enable only active port for i in range(0, NUM_PORTS): - enabled_n = 1 + enabled = 0 cur_port = f"d{i+1}" if port == cur_port: - enabled_n = 0 + enabled = 1 - setattr(self.port_rfin_en, f"gpio_{cur_port}", enabled_n) + setattr(self.port_rfin_en, f"gpio_{cur_port}", enabled) self.rfin_mux.select = port