Commit e7db1ff4 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Merge branch 'code_refactor' of gitlab-ssh.irstea.fr:reversaal/OhmPi into code_refactor

Showing with 1 addition and 3 deletions
+1 -3
......@@ -178,11 +178,9 @@ class OhmPiHardware:
if state == 'on':
self.tx.pwr_state = 'on'
self._pwr_state = 'on'
self.exec_logger.debug(f'{self.model} cannot be switched on')
elif state == 'off':
self.tx.pwr_state = 'off'
self._pwr_state = 'off'
self.exec_logger.debug(f'{self.model} cannot be switched off')
def _clear_values(self):
self.readings = np.array([])
......
......@@ -823,7 +823,7 @@ class OhmPi(object):
self.exec_logger.debug(f'tx pwr voltage: {self._hw.tx.pwr.voltage}, rx max voltage: {self._hw.rx._voltage_max}')
return False
else:
if quadrupole == [0, 0, 0, 0]: # NOTE: No mux
if np.array(quadrupole).all() == np.array([0, 0, 0, 0]).all(): # NOTE: No mux
return True
else:
return self._hw.switch_mux(electrodes=quadrupole, state='on', bypass_check=bypass_check)
......
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