From ca1840b423cf67d7c19d9042014a2b5418e00d17 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Fri, 22 Sep 2023 22:15:30 +0200
Subject: [PATCH] Modifies the way a controller is used by defining several
 connections and adding an io to components

---
 configs/config_mb_2023_3_mux_2024.py          | 4 ++--
 ohmpi/hardware_components/mux_2024_rev_0_0.py | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configs/config_mb_2023_3_mux_2024.py b/configs/config_mb_2023_3_mux_2024.py
index c52db04a..680aba50 100644
--- a/configs/config_mb_2023_3_mux_2024.py
+++ b/configs/config_mb_2023_3_mux_2024.py
@@ -39,8 +39,8 @@ HARDWARE_CONFIG = {
                          {'model': 'mux_2024_rev_0_0',  # 'ohmpi_i2c_mux64_v1.01',
                           'tca_address': None,
                           'tca_channel': 0,
-                          'mcp_0': '0x22',  # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...
-                          'mcp_1': '0x23',  # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...)
+                          'mcp_0': '0x22',  # TODO: Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...
+                          'mcp_1': '0x23',  # TODO: Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...)
                           'roles': {'A': 'X', 'B': 'Y', 'M': 'XX', 'N': 'YY'},
                           'cabling': {(i+8, j): ('mux_02', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
                           'voltage_max': 12.},
diff --git a/ohmpi/hardware_components/mux_2024_rev_0_0.py b/ohmpi/hardware_components/mux_2024_rev_0_0.py
index dfa7f422..71c0655e 100644
--- a/ohmpi/hardware_components/mux_2024_rev_0_0.py
+++ b/ohmpi/hardware_components/mux_2024_rev_0_0.py
@@ -10,7 +10,9 @@ from digitalio import Direction  # noqa
 MUX_CONFIG = HARDWARE_CONFIG['mux'].pop('default', {})
 MUX_CONFIG.update({'voltage_max': 50., 'current_max': 3.})  # board default values that overwrite system default values
 MUX_CONFIG.update({'activation_delay': 0.01, 'release_delay': 0.005})  # s
-default_mux_cabling = {(elec, role) : ('mux_1', elec) for role in ['A', 'B', 'M', 'N'] for elec in range(1,9)} # defaults to 4 roles cabling electrodes from 1 to 8
+# defaults to 4 roles cabling electrodes from 1 to 8
+default_mux_cabling = {(elec, role) : ('mux_1', elec) for role in ['A', 'B', 'M', 'N'] for elec in range(1,9)}
+# defaults to ic connection
 ctl_connection = HARDWARE_CONFIG['ctl'].pop('connection', 'i2c')
 
 inner_cabling = {'4_roles' : {(1, 'X'): {'MCP': 0, 'MCP_GPIO': 0}, (1, 'Y'): {'MCP': 0, 'MCP_GPIO': 8},
-- 
GitLab