Commit 66f9e252 authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Adds pwr_state in pwr module and refactors turn_on turn_off

Showing with 4 additions and 5 deletions
+4 -5
......@@ -396,7 +396,6 @@ class TxAbstract(ABC):
@pwr_state.setter
def pwr_state(self, state):
if state == 'on':
self._pwr_state = 'on'
self.exec_logger.debug(f'{self.model} cannot switch on power source')
......
......@@ -93,10 +93,10 @@ class Tx(Tx_mb_2023):
if not subclass_init:
self.exec_logger.event(f'{self.model}\ttx_init\tend\t{datetime.datetime.utcnow()}')
def inject(self, polarity=1, injection_duration=None,switch_pwr=True):
def inject(self, polarity=1, injection_duration=None):
# add leds?
self.pin6.value=True
Tx_mb_2023.inject(self, polarity=polarity, injection_duration=injection_duration,switch_pwr=switch_pwr)
self.pin6.value = True
Tx_mb_2023.inject(self, polarity=polarity, injection_duration=injection_duration)
self.pin6.value = False
@property
......
......@@ -78,7 +78,7 @@ class Pwr(PwrAbstract):
def current_max(self, value):
self.connection.write_register(0x0001, value * 10, 0)
def pwr_state(self):
def pwr_state(self):
return self._pwr_state
@pwr_state.setter
......
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