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

Fixes rs-check adding a bypass option to switching

Showing with 2 additions and 4 deletions
+2 -4
......@@ -53,7 +53,7 @@ class PwrAbstract(ABC):
self._state = 'off'
self._current_min = kwargs.pop('current_min', 0.)
self._current_max = kwargs.pop('current_max', 0.)
self._current_min = kwargs.pop('voltage_min', 0.)
self._voltage_min = kwargs.pop('voltage_min', 0.)
self._voltage_max = kwargs.pop('voltage_max', 0.)
@property
......
......@@ -21,14 +21,12 @@ pwr_module = importlib.import_module(f'ohmpi.hardware_components.{HARDWARE_CONFI
tx_module = importlib.import_module(f'ohmpi.hardware_components.{HARDWARE_CONFIG["tx"]["model"]}')
rx_module = importlib.import_module(f'ohmpi.hardware_components.{HARDWARE_CONFIG["rx"]["model"]}')
MUX_CONFIG = {}
# mux_boards = []
for mux_id, mux_config in HARDWARE_CONFIG['mux']['boards'].items():
mux_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["model"]}')
MUX_CONFIG[mux_id] = mux_module.MUX_CONFIG
MUX_CONFIG[mux_id].update(mux_config)
MUX_CONFIG[mux_id].update({'id': mux_id})
# mux_boards.append(mux_id)
TX_CONFIG = tx_module.TX_CONFIG
RX_CONFIG = rx_module.RX_CONFIG
......
......@@ -767,7 +767,7 @@ class OhmPi(object):
Bypasses checks for A==M or A==M or B==M or B==N (i.e. used for rs-check)
"""
assert len(quadrupole) == 4
if self._hw.tx.voltage > self._hw.rx.max_voltage and bypass_check:
if self._hw.tx.pwr.voltage > self._hw.rx.max_voltage and bypass_check:
self.exec_logger.warning('Cannot bypass checking electrode roles because tx voltage is over rx maximum voltage')
return False
else:
......
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