Commit 62a39aef authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes bug related to MUX_CONFIG in hardware_system

No related merge requests found
Showing with 2 additions and 7 deletions
+2 -7
......@@ -52,8 +52,6 @@ inner_cabling = {'4_roles' : {(1, 'X'): {'MCP': 0, 'MCP_GPIO': 0}, (1, 'Y'): {'M
class Mux(MuxAbstract):
def __init__(self, **kwargs):
if 'id' in kwargs.keys():
print(f'\nMUX_CONFIG {kwargs["id"]}: {MUX_CONFIG}\n\n')
time.sleep(1.)
MUX_CONFIG.update(HARDWARE_CONFIG['mux']['boards'][kwargs['id']])
kwargs.update({'board_name': os.path.basename(__file__).rstrip('.py')})
if 'cabling' not in kwargs.keys():
......
......@@ -56,7 +56,8 @@ class OhmPiHardware:
soh_logger=self.soh_logger,
controller=self.controller))
self._cabling = kwargs.pop('cabling', default_mux_cabling)
self.mux_boards = kwargs.pop('mux', {'mux_1': mux_module.Mux(exec_logger=self.exec_logger,
self.mux_boards = kwargs.pop('mux', {'mux_1': mux_module.Mux(id='mux_1',
exec_logger=self.exec_logger,
data_logger=self.data_logger,
soh_logger=self.soh_logger,
controller=self.controller,
......
......@@ -22,11 +22,7 @@ mux.test({'A': [9, 10, 11, 12, 13, 14, 15, 16], 'B': [9, 10, 11, 12, 13, 14, 15,
'M': [9, 10, 11, 12, 13, 14, 15, 16], 'N': [9, 10, 11, 12, 13, 14, 15, 16]})
# mux as part of a OhmPiHardware system
from utils import change_config
change_config('config_mb_2023_mux_2024.py', verbose=False)
from OhmPi.hardware_system import OhmPiHardware
print('Starting test of mux as part of a OhmPiHardware system.')
k = OhmPiHardware()
k.exec_logger.setLevel(logging.INFO)
......
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