Commit d451a121 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Attempts to fix property issue in TxAbstract init

Showing with 4 additions and 7 deletions
+4 -7
...@@ -133,19 +133,16 @@ class Tx(TxAbstract): ...@@ -133,19 +133,16 @@ class Tx(TxAbstract):
self.exec_logger.warning(f'Current pulse is not implemented for the {TX_CONFIG["model"]} board') self.exec_logger.warning(f'Current pulse is not implemented for the {TX_CONFIG["model"]} board')
def inject(self, state='on'): def inject(self, state='on'):
super().inject(state=state) TxAbstract.inject(self, state=state)
if state=='on': # Add specifics here...
self.DPS.write_register(0x09, 1) # DPS5005 on
else:
self.DPS.write_register(0x09, 0) # DPS5005 off
@property @property
def polarity(self): def polarity(self):
return super().polarity return TxAbstract.polarity.gset(self)
@polarity.setter @polarity.setter
def polarity(self, value): def polarity(self, value):
super().polarity = value TxAbstract.polarity.fset(self, value)
if value==1: if value==1:
self.pin0.value = True self.pin0.value = True
self.pin1.value = False self.pin1.value = False
......
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