Commit 1cc28409 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes bug related to the default_mux_cabling in hardware system

Showing with 3 additions and 4 deletions
+3 -4
......@@ -54,8 +54,8 @@ class Mux(MuxAbstract):
if 'id' in kwargs.keys():
MUX_CONFIG.update(HARDWARE_CONFIG['mux']['boards'][kwargs['id']])
kwargs.update({'board_name': os.path.basename(__file__).rstrip('.py')})
if 'cabling' not in kwargs.keys():
kwargs.update({'cabling': MUX_CONFIG['default_mux_cabling']})
if 'cabling' not in kwargs.keys() or kwargs['cabling'] is None:
kwargs.update({'cabling': default_mux_cabling})
super().__init__(**kwargs)
self.exec_logger.debug(f'configuration: {MUX_CONFIG}')
tca_address = kwargs.pop('tca_address', None)
......
......@@ -30,7 +30,7 @@ voltage_min = RX_CONFIG['voltage_min']
default_mux_cabling = {}
for mux in mux_boards:
if 'default_mux_cabling' in MUX_CONFIG[mux]:
update_dict(default_mux_cabling, MUX_CONFIG[mux]['default_mux_cabling'])
update_dict(default_mux_cabling, MUX_CONFIG[mux].pop('default_mux_cabling', None))
print(f'default_mux_cabling: {default_mux_cabling}')
......@@ -287,7 +287,6 @@ class OhmPiHardware:
elec_dict = {i: [] for i in roles}
for i in range(len(electrodes)):
elec_dict[roles[i]].append(electrodes[i])
print(f'parties: {self.mux_barrier.parties}')
mux_workers = []
for _, mux in self.mux_boards.items():
# start a new thread to perform some work
......
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