Commit 4c3deec7 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Tries to fix "dict object has no attr pwr" error

Showing with 4 additions and 0 deletions
+4 -0
......@@ -58,6 +58,8 @@ class Mux(MuxAbstract):
if 'cabling' not in kwargs.keys() or kwargs['cabling']=={}:
kwargs.update({'cabling': default_mux_cabling})
super().__init__(**kwargs)
if isinstance(self.ctl, dict):
self.ctl = None # TODO: How to pass controller to mux board
self.exec_logger.debug(f'configuration: {MUX_CONFIG}')
tca_address = kwargs.pop('tca_address', None)
tca_channel = kwargs.pop('tca_channel', 0)
......
......@@ -54,6 +54,8 @@ class OhmPiHardware:
HARDWARE_CONFIG['ctl'].update({'exec_logger': self.exec_logger, 'data_logger': self.data_logger,
'soh_logger': self.soh_logger})
self.ctl = kwargs.pop('ctl', ctl_module.Ctl(**HARDWARE_CONFIG['ctl']))
if isinstance(self.ctl, dict):
self.ctl = ctl_module.Ctl(**self.ctl)
HARDWARE_CONFIG['rx'].pop('model')
HARDWARE_CONFIG['rx'].update(**HARDWARE_CONFIG['rx'])
......
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