diff --git a/hardware_components/mux_2024_rev_0_0.py b/hardware_components/mux_2024_rev_0_0.py index 9ec4ec03f8dce188a682f6e739c70cd63fe57437..6aab86c2e305183a7d74badd9a83d447819f8d6f 100644 --- a/hardware_components/mux_2024_rev_0_0.py +++ b/hardware_components/mux_2024_rev_0_0.py @@ -10,6 +10,7 @@ from digitalio import Direction # noqa MUX_CONFIG = HARDWARE_CONFIG['mux'].pop('default', {}) MUX_CONFIG.update({'voltage_max': 50., 'current_max': 3.}) # board default values that overwrite system default values +MUX_CONFIG.update({'activation_delay': 10., 'release_delay': 5.}) # ms default_mux_cabling = {(elec, role) : ('mux_1', elec) for role in ['A', 'B', 'M', 'N'] for elec in range(1,9)} # defaults to 4 roles cabling electrodes from 1 to 8 @@ -105,5 +106,7 @@ class Mux(MuxAbstract): d = self.addresses[elec, role] if state == 'on': activate_relay(self._mcp[d['MCP']], d['MCP_GPIO'], True) + time.sleep(MUX_CONFIG['activation_delay']) if state == 'off': - activate_relay(self._mcp[d['MCP']], d['MCP_GPIO'], False) \ No newline at end of file + activate_relay(self._mcp[d['MCP']], d['MCP_GPIO'], False) + time.sleep(MUX_CONFIG['release_delay']) \ No newline at end of file