Commit e20ca67b authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

tests new cabling config

Showing with 29 additions and 38 deletions
+29 -38
...@@ -34,28 +34,23 @@ HARDWARE_CONFIG = { ...@@ -34,28 +34,23 @@ HARDWARE_CONFIG = {
'mux': {'boards': 'mux': {'boards':
{'mux_02': {'mux_02':
{'model': 'mux_2024_0_X', {'model': 'mux_2024_0_X',
'roles': ['A', 'B', 'M', 'N'],
'electrodes': range(1, 9),
'tca_address': None, 'tca_address': None,
'tca_channel': 0, 'tca_channel': 0,
'addr2': 'up', 'addr2': 'up',
'addr1': 'up', 'addr1': 'up'},
'roles': ['A','B','M','N'],
'electrodes': range(1,9),
# 'cabling': {(i+0, j): ('mux_02', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
'voltage_max': 12.},
'mux_05': 'mux_05':
{'model': 'mux_2024_0_X', {'model': 'mux_2024_0_X',
'roles': ['A', 'B', 'M', 'N'],
'electrodes': range(9, 17),
'tca_address': None, 'tca_address': None,
'tca_channel': 0, 'tca_channel': 0,
'addr2': 'down', 'addr2': 'down',
'addr1': 'down', 'addr1': 'down'}
'roles': ['A','B','M','N'],
'electrodes': range(9,17),
# 'roles': {'A': 'X', 'B': 'Y', 'M': 'XX', 'N': 'YY'},
# 'cabling': {(i+8, j): ('mux_05', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
'voltage_max': 12.}
}, },
'default': {'interface_name': 'i2c_ext', 'default': {'interface_name': 'i2c_ext',
'voltage_max': 100., 'voltage_max': 50.,
'current_max': 3.} 'current_max': 3.}
} }
} }
......
...@@ -35,54 +35,50 @@ HARDWARE_CONFIG = { ...@@ -35,54 +35,50 @@ HARDWARE_CONFIG = {
{'mux_A': {'mux_A':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x70, 'mux_tca_address': 0x70,
'roles': {'A': 'X'}, 'roles': 'A',
'cabling': {(i, j): ('mux_A', i) for j in ['A'] for i in range(1, 65)}, 'electrodes': range(1, 65)},
'voltage_max': 12.},
'mux_B': 'mux_B':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x71, 'mux_tca_address': 0x71,
'roles': {'B': 'X'}, 'roles': 'B',
'cabling': {(i, j): ('mux_B', i) for j in ['B'] for i in range(1, 65)}, 'electrodes': range(1,65)},
'voltage_max': 12.},
'mux_M': 'mux_M':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x72, 'mux_tca_address': 0x72,
'roles': {'M': 'X'}, 'roles': 'M',
'cabling': {(i, j): ('mux_M', i) for j in ['M'] for i in range(1, 65)}, 'electrodes': range(1, 65)},
'voltage_max': 12.},
'mux_N': 'mux_N':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x73, 'mux_tca_address': 0x73,
'roles': {'N': 'X'}, 'roles': 'N',
'cabling': {(i, j): ('mux_N', i) for j in ['N'] for i in range(1, 65)}, 'electrodes': range(1,65),
'voltage_max': 12.}, # 'cabling': {(i, j): ('mux_N', i) for j in ['N'] for i in range(1, 65)},
},
'mux_A2': 'mux_A2':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x74, 'mux_tca_address': 0x74,
'roles': {'A': 'X'}, 'roles': 'A',
'cabling': {(i+64, j): ('mux_A2', i) for j in ['A'] for i in range(1, 65)}, 'electrodes': range(65, 129)},
'voltage_max': 12.},
'mux_B2': 'mux_B2':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x75, 'mux_tca_address': 0x75,
'roles': {'B': 'X'}, 'roles': 'B',
'cabling': {(i+64, j): ('mux_B2', i) for j in ['B'] for i in range(1, 65)}, 'electrodes': range(65,129)},
'voltage_max': 12.},
'mux_M2': 'mux_M2':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x76, 'mux_tca_address': 0x76,
'roles': {'M': 'X'}, 'roles': 'M',
'cabling': {(i+64, j): ('mux_M2', i) for j in ['M'] for i in range(1, 65)}, 'electrodes': range(65,129)},
'voltage_max': 12.},
'mux_N2': 'mux_N2':
{'model': 'mux_2023_0_X', {'model': 'mux_2023_0_X',
'mux_tca_address': 0x77, 'mux_tca_address': 0x77,
'roles': {'N': 'X'}, 'roles': 'N',
'cabling': {(i+64, j): ('mux_N2', i) for j in ['N'] for i in range(1, 65)}, 'electrodes': range(65,129),
'voltage_max': 12.}, #'cabling': {(i+64, j): ('mux_N2', i) for j in ['N'] for i in range(1, 65)},
},
}, },
'default': {'interface_name': 'i2c_ext', 'default': {'interface_name': 'i2c_ext',
'voltage_max': 100., 'voltage_max': 50.,
'current_max': 3.} 'current_max': 3.}
} }
} }
......
...@@ -71,7 +71,7 @@ class Mux(MuxAbstract): ...@@ -71,7 +71,7 @@ class Mux(MuxAbstract):
self.exec_logger.debug(f'configuration: {kwargs}') self.exec_logger.debug(f'configuration: {kwargs}')
roles = kwargs.pop('roles', None) roles = kwargs.pop('roles', None)
if roles is None: if roles is None:
roles = ['A','B','M','N'] # NOTE: defaults to 4-roles roles = ['A', 'B', 'M', 'N'] # NOTE: defaults to 4-roles
else: else:
roles_board = ['X', 'Y', 'XX', 'YY'] roles_board = ['X', 'Y', 'XX', 'YY']
self._roles = {roles[i]: roles_board[i] for i in range(len(roles))} self._roles = {roles[i]: roles_board[i] for i in range(len(roles))}
......
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