Commit 9d5b9199 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Tests using 2 muxes

Showing with 2 additions and 10 deletions
+2 -10
...@@ -42,7 +42,7 @@ HARDWARE_CONFIG = { ...@@ -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_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...) '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'}, 'roles': {'A': 'X', 'B': 'Y', 'M' : 'XX', 'N' : 'YY'},
'channels': {(i, j): ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1,9)}, 'channels': {(i+16, j): ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1,9)},
'voltage_max': 12.}, 'voltage_max': 12.},
'mux_2': 'mux_2':
{'model': 'mux_2024_rev_0_0', # 'ohmpi_i2c_mux64_v1.01', {'model': 'mux_2024_rev_0_0', # 'ohmpi_i2c_mux64_v1.01',
......
...@@ -108,11 +108,6 @@ class OhmPiHardware: ...@@ -108,11 +108,6 @@ class OhmPiHardware:
mux_config['id'] = mux_id mux_config['id'] = mux_id
print(f'mux_id: {mux_id}, mux_config: {mux_config}') # TODO: Delete me! print(f'mux_id: {mux_id}, mux_config: {mux_config}') # TODO: Delete me!
# mux_config.update(**HARDWARE_CONFIG['tx'])
# HARDWARE_CONFIG['tx'].update({'ctl': self.ctl})
# HARDWARE_CONFIG['tx'].update({'exec_logger': self.exec_logger, 'data_logger': self.data_logger,
# 'soh_logger': self.soh_logger})
self.mux_boards[mux_id] = mux_module.Mux(**mux_config) self.mux_boards[mux_id] = mux_module.Mux(**mux_config)
# self.mux_boards = kwargs.pop('mux', {'mux_1': mux_module.Mux(id='mux_1', # self.mux_boards = kwargs.pop('mux', {'mux_1': mux_module.Mux(id='mux_1',
...@@ -125,10 +120,7 @@ class OhmPiHardware: ...@@ -125,10 +120,7 @@ class OhmPiHardware:
self.mux_barrier = Barrier(len(self.mux_boards) + 1) self.mux_barrier = Barrier(len(self.mux_boards) + 1)
self._cabling = {} self._cabling = {}
for mux_id, mux in self.mux_boards.items(): for mux_id, mux in self.mux_boards.items():
if isinstance(mux, dict): print(f'{mux_id} CONFIG: {MUX_CONFIG["mux_id"]}')
# self.mux_boards[mux_id] =
pass
print(f'MUX_CONFIG: {MUX_CONFIG}')
mux.barrier = self.mux_barrier mux.barrier = self.mux_barrier
for k, v in mux.cabling.items(): for k, v in mux.cabling.items():
update_dict(self._cabling, {k: (mux_id, k[0])}) update_dict(self._cabling, {k: (mux_id, k[0])})
......
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