Commit 7502e117 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Adds reset method in MuxAbstract

Showing with 11 additions and 9 deletions
+11 -9
......@@ -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.}}
}
......
......@@ -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)
......
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