From 7045b8488c1f423e0589ee13851914a6d9f17daa Mon Sep 17 00:00:00 2001 From: awatlet <arnaud.watlet@umons.ac.be> Date: Tue, 14 Nov 2023 12:20:02 +0100 Subject: [PATCH] Fixes rs_check --- ohmpi/ohmpi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py index 464c1c7a..a1c12751 100644 --- a/ohmpi/ohmpi.py +++ b/ohmpi/ohmpi.py @@ -821,8 +821,8 @@ class OhmPi(object): for i in range(0, quads.shape[0]): quad = quads[i, :] # quadrupole self._hw.switch_mux(electrodes=list(quads[i, :2]), roles=['A', 'B'], state='on') - if self.tx.pwr.pwr_state == 'off': - self.tx.pwr.pwr_state = 'on' + if self._hw.pwr.pwr_state == 'off': + self._hw.pwr.pwr_state = 'on' switch_pwr_off = True self._hw._vab_pulse(duration=0.2, vab=tx_volt) current = self._hw.readings[-1, 3] @@ -876,7 +876,7 @@ class OhmPi(object): self.status = 'idle' if switch_pwr_off: - self.tx.pwr.pwr_state = 'off' + self._hw.pwr.pwr_state = 'off' # if power was off before measurement, let's turn if off if switch_tx_pwr_off: self._hw.pwr_state = 'off' -- GitLab