diff --git a/hardware/abstract_hardware.py b/hardware/abstract_hardware.py index fa2f99fa91dded2b55cdcfba3c633e452899fedd..881c9bea4f9d41724c637f7aa315675e02357ad7 100644 --- a/hardware/abstract_hardware.py +++ b/hardware/abstract_hardware.py @@ -48,7 +48,7 @@ class TxAbstract(ABC): @property @abstractmethod def current(self): - # add actions to read the DPS current and return it + # add actions to read the TX current and return it return None @current.setter diff --git a/hardware/mb_2024_rev_0_0.py b/hardware/mb_2024_rev_0_0.py index 67e25af92866af96a92803fae111e50fa3830ac0..bfabb780760f36bbd6bd7d0a4019c0ccb42da742 100644 --- a/hardware/mb_2024_rev_0_0.py +++ b/hardware/mb_2024_rev_0_0.py @@ -139,7 +139,7 @@ class Tx(TxAbstract): def current(self): """ Gets the current IAB in Amps """ - return AnalogIn(self._ads_current, ads.P0).voltage * 1000. / (50 * TX_CONFIG['R_shunt']) # noqa measure current + return AnalogIn(self._ads_current, ads.P0).voltage * 1000. / (50 * TX_CONFIG['r_shunt']) # noqa measure current @ current.setter def current(self, value): diff --git a/hardware/ohmpi_card_3_15.py b/hardware/ohmpi_card_3_15.py index 064a99f7482229da188579c28cfe744e2394ffa6..72d5568b25c903bfa17250353c78f011caca1d7c 100644 --- a/hardware/ohmpi_card_3_15.py +++ b/hardware/ohmpi_card_3_15.py @@ -125,7 +125,9 @@ class Tx(TxAbstract): def current(self): """ Gets the current IAB in Amps """ - return AnalogIn(self._ads_current, ads.P0).voltage * 1000. / (50 * TX_CONFIG['r_shunt']) # noqa measure current + iab = AnalogIn(self._ads_current, ads.P0).voltage * 1000. / (50 * TX_CONFIG['r_shunt']) # measure current + self.exec_logger.debug(f'Reading TX current: {iab} mA') + return iab @ current.setter def current(self, value): @@ -138,7 +140,7 @@ class Tx(TxAbstract): @property def polarity(self): - return TxAbstract.polarity.gset(self) + return TxAbstract.polarity.fget(self) @polarity.setter def polarity(self, value):