From 983f50cd0907b140a7e7ce9c3115c1935a2f9a93 Mon Sep 17 00:00:00 2001 From: Bernhard Bablok Date: Mon, 8 Jul 2024 13:29:46 +0200 Subject: [PATCH] removed reset() and MODE_IDLE from constructor --- adafruit_ens160.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/adafruit_ens160.py b/adafruit_ens160.py index 489d0c5..1de3abb 100644 --- a/adafruit_ens160.py +++ b/adafruit_ens160.py @@ -106,11 +106,8 @@ class ENS160: def __init__(self, i2c_bus: I2C, address: int = ENS160_I2CADDR_DEFAULT) -> None: self.i2c_device = i2c_device.I2CDevice(i2c_bus, address) - self.reset() - if self.part_id != 0x160: raise RuntimeError("Unable to find ENS160, check your wiring") - self.mode = MODE_IDLE self.clear_command() self.mode = MODE_STANDARD self._buf = bytearray(8)