From 0ce36a990d1cb48be0b3ac530bc51f80c63eb23e Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Wed, 30 Aug 2023 20:43:55 +0200
Subject: [PATCH] Updates a test in dev for 2 muxes 2024

---
 configs/config_mb_2023_2_mux_2024.py | 4 ++--
 dev/test_2_mux_2024.py               | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configs/config_mb_2023_2_mux_2024.py b/configs/config_mb_2023_2_mux_2024.py
index 7146a1b4..3b0e8cad 100644
--- a/configs/config_mb_2023_2_mux_2024.py
+++ b/configs/config_mb_2023_2_mux_2024.py
@@ -42,7 +42,7 @@ HARDWARE_CONFIG = {
                           '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, j): ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
+                          'cabling': {(i+8, j): ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
                           'voltage_max': 12.},
                      'mux_2':
                          {'model': 'mux_2024_rev_0_0',  # 'ohmpi_i2c_mux64_v1.01',
@@ -51,7 +51,7 @@ HARDWARE_CONFIG = {
                           'mcp_0': '0x24',  # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...
                           'mcp_1': '0x25',  # 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_2', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
+                          'cabling': {(i+16, j): ('mux_2', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
                           'voltage_max': 12.}
                      },
              'default': {'voltage_max': 100.,
diff --git a/dev/test_2_mux_2024.py b/dev/test_2_mux_2024.py
index 48e3f289..eb7a95fe 100644
--- a/dev/test_2_mux_2024.py
+++ b/dev/test_2_mux_2024.py
@@ -45,15 +45,15 @@ if within_ohmpi:
     print('Starting test of mux within OhmPi.')
     k = OhmPi()
     k.reset_mux()
-    k._hw.switch_mux([1, 4, 2, 3], state='on')
+    k._hw.switch_mux([9, 12, 10, 11], state='on')
     k._hw.vab_square_wave(3.,1)
-    k._hw.switch_mux([1, 4, 2, 3], state='off')
+    k._hw.switch_mux([9, 12, 10, 11], state='off')
     k._hw.calibrate_rx_bias()  # electrodes 1 4 2 3 should be connected to a reference circuit
     # print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
     # k._hw._plot_readings()
-    k._hw.switch_mux([1, 4, 2, 3], state='on')
+    k._hw.switch_mux([9, 12, 10, 11], state='on')
     k._hw.vab_square_wave(3.,1)
-    k._hw.switch_mux([1, 4, 2, 3], state='off')
+    k._hw.switch_mux([9, 12, 10, 11], state='off')
     print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
     k._hw._plot_readings()
     plot_exec_log('ohmpi/logs/exec.log')
-- 
GitLab