From b0b55d572be59a1a69d135cec225572ecad4e0d1 Mon Sep 17 00:00:00 2001 From: Arnaud Watlet <arnaud.watlet@umons.ac.be> Date: Tue, 12 Dec 2023 15:53:47 +0100 Subject: [PATCH] updates ohmpi for voltage_adjustable --- ohmpi/ohmpi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py index 41e94e67..acc866ad 100644 --- a/ohmpi/ohmpi.py +++ b/ohmpi/ohmpi.py @@ -499,7 +499,7 @@ class OhmPi(object): """ # check pwr is on, if not, let's turn it on switch_power_off = False - if self._hw.pwr_state == 'off': + if self.tx.pwr.voltage_adjustable and self._hw.pwr_state == 'off': self._hw.pwr_state = 'on' switch_power_off = True @@ -688,7 +688,8 @@ class OhmPi(object): fw_in_zip = self.settings['fw_in_zip'] # switch power on - self._hw.pwr_state = 'on' + if self.tx.pwr.voltage_adjustable: + self._hw.pwr_state = 'on' self.status = 'running' self.exec_logger.debug(f'Status: {self.status}') self.exec_logger.debug(f'Measuring sequence: {self.sequence}') -- GitLab