diff --git a/ohmpi/hardware_components/abstract_hardware_components.py b/ohmpi/hardware_components/abstract_hardware_components.py index eb85474879fba43d494766596a223390f725352f..54c56fb466a19742185f600cff3ace373f3c48e7 100644 --- a/ohmpi/hardware_components/abstract_hardware_components.py +++ b/ohmpi/hardware_components/abstract_hardware_components.py @@ -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') diff --git a/ohmpi/hardware_components/mb_2024_0_2.py b/ohmpi/hardware_components/mb_2024_0_2.py index b82545da18831c317eebe427710f78f1e65f1b7d..5f8f4fb115547d86a752cd7aa1e9986632f81c6d 100644 --- a/ohmpi/hardware_components/mb_2024_0_2.py +++ b/ohmpi/hardware_components/mb_2024_0_2.py @@ -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 diff --git a/ohmpi/hardware_components/pwr_dps5005.py b/ohmpi/hardware_components/pwr_dps5005.py index c6e3a600da6f6d78170158850357a361c723d86e..691fc39668931c5d691ca3ea1eee1b744ff4ab35 100644 --- a/ohmpi/hardware_components/pwr_dps5005.py +++ b/ohmpi/hardware_components/pwr_dps5005.py @@ -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