From ffc1226bf4745d9d55158256f54d3c81dea6187a Mon Sep 17 00:00:00 2001
From: Arnaud Watlet <arnaud.watlet@umons.ac.be>
Date: Wed, 29 Nov 2023 11:36:02 +0100
Subject: [PATCH] tests new cabling config

---
 ohmpi/hardware_components/mux_2024_0_X.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ohmpi/hardware_components/mux_2024_0_X.py b/ohmpi/hardware_components/mux_2024_0_X.py
index a91b529a..b6b2a079 100644
--- a/ohmpi/hardware_components/mux_2024_0_X.py
+++ b/ohmpi/hardware_components/mux_2024_0_X.py
@@ -83,6 +83,12 @@ class Mux(MuxAbstract):
             self.exec_logger.error(f'Invalid role assignment for {self.model}: {self._roles} !')
             self._mode = ''
 
+        print('cabling', cabling)
+        electrodes = kwargs.pop('electrodes', None)
+        self.cabling = {}
+        if cabling is None:
+            self.cabling = {(e, r): i + 1 for r in roles for i, e in enumerate(electrodes)}
+
         # Setup TCA
         tca_address = kwargs.pop('tca_address', None)
         tca_channel = kwargs.pop('tca_channel', 0)
-- 
GitLab