From 08193b6b7e8eaee0ba039abbbb09aa1031d6d388 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Thu, 8 Jun 2023 15:34:50 +0200
Subject: [PATCH] Tests using 2 muxes

---
 ohmpi/hardware_system.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index 1f1a2492..5bddd601 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -94,7 +94,9 @@ class OhmPiHardware:
         self._cabling = kwargs.pop('cabling', {})
         self.mux_boards = {}
         for mux_id, mux_config in HARDWARE_CONFIG['mux']['boards'].items():
-            print(f'mux_id: {mux_id}, mux_config: {mux_config}')  # TODO: Delete me!
+            mux_config.update({'exec_logger': self.exec_logger, 'data_logger': self.data_logger,
+                               'soh_logger': self.soh_logger})
+            mux_config.update(**HARDWARE_CONFIG['mux']['boards'][mux_id])
             mux_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["model"]}')
             ctl = mux_config.pop('ctl', self.ctl)
             if isinstance(ctl, dict):
@@ -102,8 +104,7 @@ class OhmPiHardware:
                 ctl = mux_ctl_module.Ctl(**self.ctl)
             mux_config.update({'ctl': ctl})
             assert issubclass(type(mux_config['ctl']), CtlAbstract)
-            mux_config.update({'exec_logger': self.exec_logger, 'data_logger': self.data_logger,
-                               'soh_logger': self.soh_logger})
+
             mux_config['id'] = mux_id
             print(f'mux_id: {mux_id}, mux_config: {mux_config}')  # TODO: Delete me!
 
-- 
GitLab