diff --git a/ohmpi/hardware_components/mb_2024_0_2.py b/ohmpi/hardware_components/mb_2024_0_2.py index ce6b931236ebc573e9426638315dcfcd97a3f86f..deb8c5932dbd3412d3d4e2bdaa747f62bd3eb823 100644 --- a/ohmpi/hardware_components/mb_2024_0_2.py +++ b/ohmpi/hardware_components/mb_2024_0_2.py @@ -138,19 +138,19 @@ class Tx(Tx_mb_2023): assert polarity in [-1, 0, 1] self._polarity = polarity if polarity == 1: - if self.pwr.voltage_adjustable: + if not self.pwr.voltage_adjustable: self.pwr_state = 'on' self.pin0.value = True self.pin1.value = False time.sleep(self._activation_delay) elif polarity == -1: - if self.pwr.voltage_adjustable: + if not self.pwr.voltage_adjustable: self.pwr_state = 'on' self.pin0.value = False self.pin1.value = True time.sleep(self._activation_delay) else: - if self.pwr.voltage_adjustable: + if not self.pwr.voltage_adjustable: self.pwr_state = 'off' self.pin0.value = False self.pin1.value = False diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index b26dbf99322f4078f3d007722c98771a0c1fc39f..532026c3d626dc007cd5262e37c59a65fbcb12a8 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -137,6 +137,8 @@ class OhmPiHardware: if isinstance(self.tx, dict): self.tx = tx_module.Tx(**self.tx) self.tx.pwr = self.pwr + if not self.tx.pwr.voltage_adjustable: + self.tx._pwr_latency = 0 self.tx.polarity = 0 self.tx.pwr._current_max = current_max