diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index cc0e31a039768a14e8470c287ddf6828b4ea8330..bdf03b00c91571b40f740c416414026b7a6eb0e6 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -108,9 +108,9 @@ class OhmPiHardware: mux_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["model"]}') if isinstance(mux_config['ctl'], dict): ### TODO: is this needed? mux_ctl_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["ctl"]["model"]}') - ctl = mux_ctl_module.Ctl(**mux_config['ctl']) # (**self.ctl) + mux_config['ctl'] = mux_ctl_module.Ctl(**mux_config['ctl']) # (**self.ctl) assert issubclass(type(mux_config['ctl']), CtlAbstract) - io = mux_config.pop('io', ctl.connections[mux_config.pop('connection', 'i2c')]) + io = mux_config.pop('io', mux_config['ctl'].connections[mux_config.pop('connection', 'i2c')]) mux_config.update({'io': io}) mux_config['id'] = mux_id