Commit 5e79c7ba authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Adds logging message for current

No related merge requests found
Showing with 6 additions and 4 deletions
+6 -4
......@@ -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
......
......@@ -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):
......
......@@ -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):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment