Commit 51efa7ac authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Cleans mux_2024_rev_0_0 test

Showing with 1 addition and 5 deletions
+1 -5
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.')
......
......@@ -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':
......
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