Commit 08193b6b authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Tests using 2 muxes

Showing with 4 additions and 3 deletions
+4 -3
...@@ -94,7 +94,9 @@ class OhmPiHardware: ...@@ -94,7 +94,9 @@ class OhmPiHardware:
self._cabling = kwargs.pop('cabling', {}) self._cabling = kwargs.pop('cabling', {})
self.mux_boards = {} self.mux_boards = {}
for mux_id, mux_config in HARDWARE_CONFIG['mux']['boards'].items(): 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"]}') mux_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["model"]}')
ctl = mux_config.pop('ctl', self.ctl) ctl = mux_config.pop('ctl', self.ctl)
if isinstance(ctl, dict): if isinstance(ctl, dict):
...@@ -102,8 +104,7 @@ class OhmPiHardware: ...@@ -102,8 +104,7 @@ class OhmPiHardware:
ctl = mux_ctl_module.Ctl(**self.ctl) ctl = mux_ctl_module.Ctl(**self.ctl)
mux_config.update({'ctl': ctl}) mux_config.update({'ctl': ctl})
assert issubclass(type(mux_config['ctl']), CtlAbstract) 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 mux_config['id'] = mux_id
print(f'mux_id: {mux_id}, mux_config: {mux_config}') # TODO: Delete me! print(f'mux_id: {mux_id}, mux_config: {mux_config}') # TODO: Delete me!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment