diff --git a/ohmpi/hardware_components/abstract_hardware_components.py b/ohmpi/hardware_components/abstract_hardware_components.py index 2f788aadee3c6b2c9e0f83d2699d51aab8e28e6d..be4c42c34c438d1ee7bf7ce046dcd12331017ab2 100644 --- a/ohmpi/hardware_components/abstract_hardware_components.py +++ b/ohmpi/hardware_components/abstract_hardware_components.py @@ -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 diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index e8ec50abac9c97d58d7816cb333f76066d3854d5..69967c3067afe4704150cd742f6e7f7593d497b1 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -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 diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py index 8dce80b4e655c1d8b17b27ab74f29e8b0394499e..e7b454ebd3daadb382373b068925b8a3707aa651 100644 --- a/ohmpi/ohmpi.py +++ b/ohmpi/ohmpi.py @@ -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: