Commit e562d0e9 authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Updates mux handling in hardware system

Showing with 2 additions and 2 deletions
+2 -2
...@@ -104,8 +104,8 @@ class OhmPiHardware: ...@@ -104,8 +104,8 @@ class OhmPiHardware:
'soh_logger': self.soh_logger}) 'soh_logger': self.soh_logger})
mux_config.update(**HARDWARE_CONFIG['mux']['boards'][mux_id]) 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.update(mux_config.pop('ctl', self.ctl)) mux_config.update(mux_config.pop('ctl', self.ctl))
if isinstance(ctl, dict): if isinstance(ctl, dict): ### TODO: is this needed?
mux_ctl_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["ctl"]["model"]}') mux_ctl_module = importlib.import_module(f'ohmpi.hardware_components.{mux_config["ctl"]["model"]}')
ctl = mux_ctl_module.Ctl(**self.ctl) ctl = mux_ctl_module.Ctl(**self.ctl)
assert issubclass(type(mux_config['ctl']), CtlAbstract) assert issubclass(type(mux_config['ctl']), CtlAbstract)
......
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