From 51efa7ac81dc800288e87dec8714d945748cf2c4 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Thu, 27 Apr 2023 09:28:36 +0200
Subject: [PATCH] Cleans mux_2024_rev_0_0 test

---
 hardware_components/abstract_hardware_components.py | 5 +----
 hardware_components/mux_2024_rev_0_0.py             | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/hardware_components/abstract_hardware_components.py b/hardware_components/abstract_hardware_components.py
index c8ca0b37..76550cd3 100644
--- a/hardware_components/abstract_hardware_components.py
+++ b/hardware_components/abstract_hardware_components.py
@@ -1,7 +1,6 @@
 from abc import ABC, abstractmethod
 
 import numpy as np
-import json
 from OhmPi.logging_setup import create_stdout_logger
 import time
 
@@ -97,7 +96,7 @@ class MuxAbstract(ABC):
 
     @abstractmethod
     def switch_one(self, elec=None, role=None, state=None):
-        pass
+        self.exec_logger.debug(f'switching {state} electrode {elec} with role {role}')
 
     def test(self, elec_dict, activation_time=1.):
         """Method to test the multiplexer.
@@ -115,10 +114,8 @@ class MuxAbstract(ABC):
         for role in elec_dict.keys():
             for elec in elec_dict[role]:
                 self.switch_one(elec, role, 'on')
-                self.exec_logger.debug(f'electrode: {elec} activated.')
                 time.sleep(activation_time)
                 self.switch_one(elec, role, 'off')
-                self.exec_logger.debug(f'electrode: {elec} deactivated.')
                 time.sleep(activation_time)
         self.exec_logger.debug('Test finished.')
 
diff --git a/hardware_components/mux_2024_rev_0_0.py b/hardware_components/mux_2024_rev_0_0.py
index 6818f03a..18063456 100644
--- a/hardware_components/mux_2024_rev_0_0.py
+++ b/hardware_components/mux_2024_rev_0_0.py
@@ -122,7 +122,6 @@ class Mux(MuxAbstract):
             pin_enable.value = state
 
         d = self.addresses[elec, role]
-        self.exec_logger.debug(f'switching {state} electrode {elec} with role {role}')
         if state == 'on':
             set_relay_state(self._mcp[d['MCP']], d['MCP_GPIO'], True)
         if state == 'off':
-- 
GitLab