From 75bfd2d93ab17c86b2c5ae827b92ccc5e13cdb5e Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Tue, 28 Nov 2023 16:54:30 +0100
Subject: [PATCH] Tries to fix adafruit warning

---
 ohmpi/hardware_components/raspberry_pi.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py
index f7291686..f9a9d40b 100644
--- a/ohmpi/hardware_components/raspberry_pi.py
+++ b/ohmpi/hardware_components/raspberry_pi.py
@@ -43,6 +43,7 @@ class Ctl(CtlAbstract):
             self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA)  # noqa
         except RuntimeWarning:
             pass
+        warnings.resetwarnings()
 
         # Extended I2C
         try:
@@ -50,9 +51,9 @@ class Ctl(CtlAbstract):
         except RuntimeWarning:
             pass
         except Exception as e:
-            self.exec_logger.error(f'Could not initialize Extended I2C:\n{e}')
+            self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}')
+
 
-        warnings.resetwarnings()
 
         # modbus
         try:
-- 
GitLab