From 241d1915d4cd6313004f3a41780cac47876a7f61 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Mon, 28 Aug 2023 11:16:13 +0200
Subject: [PATCH] Fixes test_mux_2024_2_roles_AB.py

---
 configs/config_mb_2023_mux_2024_2_roles_AB.py |  8 ++++----
 dev/test_mux_2024_2_roles_AB.py               | 10 +++++++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/configs/config_mb_2023_mux_2024_2_roles_AB.py b/configs/config_mb_2023_mux_2024_2_roles_AB.py
index cab686fe..0b04b948 100644
--- a/configs/config_mb_2023_mux_2024_2_roles_AB.py
+++ b/configs/config_mb_2023_mux_2024_2_roles_AB.py
@@ -37,12 +37,12 @@ HARDWARE_CONFIG = {
             # both will be overwritten by properties specified in the board dict below. Use with caution...
         {'boards':
                 {'mux_1':
-                     {'model' : 'mux_2024_rev_0_0', # 'ohmpi_i2c_mux64_v1.01',
+                     {'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...)
-                      'roles' : {'A': 'X', 'B': 'Y'},
+                      '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'},
                       'voltage_max': 12.
                 }},
             'default': {'voltage_max': 100., 'current_max': 3.}}
diff --git a/dev/test_mux_2024_2_roles_AB.py b/dev/test_mux_2024_2_roles_AB.py
index c8daee6a..88b86cf6 100644
--- a/dev/test_mux_2024_2_roles_AB.py
+++ b/dev/test_mux_2024_2_roles_AB.py
@@ -12,9 +12,13 @@ within_ohmpi = False  # Testing hardware component as a part of the hardware sys
 update_mux_config = False
 # Stand alone mux
 if stand_alone_mux:
-    # MUX_CONFIG['ctl'] = ctl_module.Ctl()
-    # MUX_CONFIG['id'] = 'mux_1'
-    # MUX_CONFIG['cabling'] = {(i+8, j) : ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1,9)}
+    MUX_CONFIG['ctl'] = ctl_module.Ctl()
+    MUX_CONFIG['id'] = 'mux_1'
+    MUX_CONFIG['cabling'] = {(i, j): ('mux_1', i) for j in ['A', 'B'] for i in range(1,17)}
+    MUX_CONFIG['roles'] = {'A': 'X', 'B': 'Y'}
+    MUX_CONFIG['mcp_0'] = '0x26'
+    MUX_CONFIG['mcp_1'] = '0x27'
+
     mux = Mux(**MUX_CONFIG)
     mux.switch_one(elec=2, role='A', state='on')
     time.sleep(2)
-- 
GitLab