diff --git a/ohmpi/hardware_components/ohmpi_card_3_15.py b/ohmpi/hardware_components/ohmpi_card_3_15.py index d8a63edf4e70d0b9df855afe22d9a23c434f5f9d..643ed23a8a65f337b2ff26e41503169ced19b25f 100644 --- a/ohmpi/hardware_components/ohmpi_card_3_15.py +++ b/ohmpi/hardware_components/ohmpi_card_3_15.py @@ -96,7 +96,7 @@ class Tx(TxAbstract): self.ctl = ctl_module.Ctl() # elif isinstance(self.ctl, dict): # self.ctl = ctl_module.Ctl(**self.ctl) - self.io = self.ctl[kwargs.pop('connection', ctl_connection)] + self.io = self.ctl.connections[kwargs.pop('connection', ctl_connection)] # I2C connexion to MCP23008, for current injection self.mcp_board = MCP23008(self.io, address=TX_CONFIG['mcp_board_address']) @@ -228,7 +228,7 @@ class Rx(RxAbstract): self.exec_logger.event(f'{self.board_name}\trx_init\tbegin\t{datetime.datetime.utcnow()}') if self.ctl is None: self.ctl = ctl_module.Ctl() - self.io = self.ctl[kwargs.pop('connection', ctl_connection)] + self.io = self.ctl.connections[kwargs.pop('connection', ctl_connection)] # ADS1115 for voltage measurement (MN) self._ads_voltage_address = 0x49