diff --git a/config_mb_2023_mux_2024.py b/config_mb_2023_mux_2024.py index a52c1702a18d6139c8a17ffab403f16bdfdbb973..097d5fde54dfae8b204d04c593c62dd297a47002 100644 --- a/config_mb_2023_mux_2024.py +++ b/config_mb_2023_mux_2024.py @@ -34,12 +34,14 @@ HARDWARE_CONFIG = { # overwritten by board properties defined at the board level within the board model file # 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', - '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...) - 'voltage_max': 12. + {'mux_1': + {'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', 'M' : 'XX', 'N' : 'YY'}, + 'voltage_max': 12. }}, 'default': {'voltage_max': 100., 'current_max': 3.}} } diff --git a/test_mux_2024.py b/test_mux_2024.py index 0dbc135958c652408f56ff21b5127f1256d8f85c..f313ea6f97c81eaa0a657c18ec98c0cefa44164f 100644 --- a/test_mux_2024.py +++ b/test_mux_2024.py @@ -5,13 +5,13 @@ change_config('config_mb_2023_mux_2024.py', verbose=False) from OhmPi.hardware_components.mux_2024_rev_0_0 import Mux, MUX_CONFIG from OhmPi.hardware_components import raspberry_pi as controller_module -stand_alone_mux = False -part_of_hardware_system = True +stand_alone_mux = True +part_of_hardware_system = False # Stand alone mux if stand_alone_mux: MUX_CONFIG['controller'] = controller_module.Controller() MUX_CONFIG['id'] = 'mux_1' - MUX_CONFIG['default_mux_cabling'] = {(i+8, j) : ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1,9)} + MUX_CONFIG['cabling'] = {(i+8, j) : ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1,9)} mux = Mux(**MUX_CONFIG) mux.switch_one(elec=9, role='M', state='on') time.sleep(2)