diff --git a/ohmpi/hardware_components/abstract_hardware_components.py b/ohmpi/hardware_components/abstract_hardware_components.py index 603e2f0c3f6f47a33b488191cccd4079afd20d1e..c670948c07e8102f66a7e066fab97f3cdecf2565 100644 --- a/ohmpi/hardware_components/abstract_hardware_components.py +++ b/ohmpi/hardware_components/abstract_hardware_components.py @@ -9,7 +9,7 @@ from threading import Barrier class CtlAbstract(ABC): def __init__(self, **kwargs): self.board_name = kwargs.pop('board_name', 'unknown CTL hardware') - self.bus = None # TODO: allow for several buses + self.bus = None # TODO: allow for several buses self.exec_logger = kwargs.pop('exec_logger', None) if self.exec_logger is None: self.exec_logger = create_stdout_logger('exec_ctl') diff --git a/ohmpi/hardware_components/ohmpi_card_3_15.py b/ohmpi/hardware_components/ohmpi_card_3_15.py index 63630605e0e8d87330d7460376a9cbb4bcd23378..a09cf278710ed7926d7674c905bfbfb2954ca41d 100644 --- a/ohmpi/hardware_components/ohmpi_card_3_15.py +++ b/ohmpi/hardware_components/ohmpi_card_3_15.py @@ -82,6 +82,8 @@ class Tx(TxAbstract): self.current_adjustable = False if self.ctl is None: self.ctl = ctl_module.Ctl() + elif self.ctl is isinstance(dict): + self.ctl = ctl_module.Ctl(dict) # I2C connexion to MCP23008, for current injection self.mcp_board = MCP23008(self.ctl.bus, address=TX_CONFIG['mcp_board_address']) @@ -204,6 +206,8 @@ class Rx(RxAbstract): super().__init__(**kwargs) if self.ctl is None: self.ctl = ctl_module.Ctl() + elif self.ctl is isinstance(dict): + self.ctl = ctl_module.Ctl(dict) # ADS1115 for voltage measurement (MN) self._ads_voltage_address = 0x49