From 6865deea40242176f16b31a2d921e4f73b5bd94b Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Wed, 26 Apr 2023 16:24:12 +0200
Subject: [PATCH] Tries to implement switch_on in mux_2024

---
 hardware_components/mux_2024_rev_0_0.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hardware_components/mux_2024_rev_0_0.py b/hardware_components/mux_2024_rev_0_0.py
index f5920c11..d9387ee8 100644
--- a/hardware_components/mux_2024_rev_0_0.py
+++ b/hardware_components/mux_2024_rev_0_0.py
@@ -50,11 +50,9 @@ class Mux(MuxAbstract):
         else:
             tca = adafruit_tca9548a.TCA9548A(self.controller.bus, d['TCA_address'])[d['TCA_channel']]
         mcp = MCP23017(tca, address=d['MCP_address'])
+        self.exec_logger.debug(f'switching {state} electrode {elec} with role {role} on TCA {d["TCA_address"]}, channel '
+                               f'{d["TCA_channel"]}, MCP {d["MCP_address"]}, gpio {d["MCP_GPIO"]}')
         if state == 'on':
-            print('opening gpio nr', d['MCP_GPIO'])
-            print('opening electrode nr', elec)
-            print('opening role', role)
-            print('opening MCP', d['MCP_address'])
             set_relay_state(mcp, d['MCP_GPIO'], True)
         if state == 'off':
             set_relay_state(mcp, d['MCP_GPIO'], False)
-- 
GitLab