Commit 5106276e authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Refactors mux barrier to only activate muxes involved

Showing with 6 additions and 3 deletions
+6 -3
......@@ -284,9 +284,12 @@ class OhmPiHardware:
mux_workers = []
for idx, elec in enumerate(electrodes):
elec_dict[roles[idx]].append(elec)
mux = self._cabling[(elec, roles[idx])][0]
if mux not in mux_workers:
mux_workers.append(mux)
try:
mux = self._cabling[(elec, roles[idx])][0]
if mux not in mux_workers:
mux_workers.append(mux)
except KeyError:
self.exec_logger.warning(f'({elec}, {roles[idx]} is not in cabling. It will be ignored...')
mux_workers = list(set(mux_workers))
b = Barrier(len(mux_workers)+1)
self.mux_barrier = b
......
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