Commit 4316fc3e authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes bug in mux_2024_rev_0_0 reset

Showing with 3 additions and 3 deletions
+3 -3
......@@ -113,7 +113,7 @@ class MuxAbstract(ABC):
self.reset()
for role in elec_dict.keys():
for elec in elec_dict['role']:
for elec in elec_dict[role]:
self.switch_one(elec, role, 'on')
self.exec_logger.debug(f'electrode: {elec} activated.')
time.sleep(activation_time)
......
......@@ -111,7 +111,7 @@ class Mux(MuxAbstract):
def reset(self):
self._mcp[0] = MCP23017(self._tca, address=int(self._mcp_addresses[0], 16))
self._mcp[1] = MCP23017(self._tca, address=int(self._mcp_addresses[0], 16))
self._mcp[1] = MCP23017(self._tca, address=int(self._mcp_addresses[1], 16))
def switch_one(self, elec=None, role=None, state=None):
MuxAbstract.switch_one(self, elec=elec, role=role, state=state)
......
......@@ -13,5 +13,5 @@ mux.switch({'A': [1], 'B': [4], 'M': [2], 'N': [3]}, state='on')
time.sleep(8)
#mux.switch({'A': [1], 'B': [4], 'M': [2], 'N': [3]}, state='off')
mux.reset()
# mux.test({'A': [1, 2, 3, 4], 'B': [4, 5, 6, 7], 'M': [2, 3, 4, 5], 'N': [3, 4, 5, 6]})
mux.test({'A': [1, 2, 3, 4], 'B': [4, 5, 6, 7], 'M': [2, 3, 4, 5], 'N': [3, 4, 5, 6]})
change_config('config_default.py', verbose=False)
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