Commit 7822012a authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Solves issue #127

Showing with 1 addition and 3 deletions
+1 -3
......@@ -37,9 +37,7 @@ class Ctl(CtlAbstract):
# None interface for battery
self.interfaces['none'] = None
# warnings.filterwarnings("error") # to filter out adafruit warning about setting I2C frequency
# I2C
warnings.filterwarnings(RuntimeWarning, action='ignore', module=busio)
try:
self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa
except Exception as e:
......@@ -47,7 +45,7 @@ class Ctl(CtlAbstract):
# warnings.resetwarnings()
# Extended I2C
warnings.filterwarnings(RuntimeWarning, action='ignore', module=ExtendedI2C)
warnings.filterwarnings(action='ignore', category=RuntimeWarning, module='adafruit_blinka') # to filter out adafruit warning about setting I2C frequency
try:
self.interfaces['i2c_ext'] = ExtendedI2C(4) # 4 is defined
except Exception as e:
......
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