From d783bedfb53b6cfb3879bc65a756c34d7934ef3a Mon Sep 17 00:00:00 2001 From: Nicolas SALMIN Date: Tue, 9 Feb 2021 10:00:05 +0100 Subject: [PATCH 1/6] Add temperature support --- adafruit_lsm6ds/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/adafruit_lsm6ds/__init__.py b/adafruit_lsm6ds/__init__.py index c475021..b3a6046 100644 --- a/adafruit_lsm6ds/__init__.py +++ b/adafruit_lsm6ds/__init__.py @@ -174,11 +174,14 @@ class LSM6DS: # pylint: disable=too-many-instance-attributes # Structs _raw_accel_data = Struct(_LSM6DS_OUTX_L_A, " Date: Tue, 9 Feb 2021 10:49:20 +0100 Subject: [PATCH 2/6] Fix temp format --- adafruit_lsm6ds/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_lsm6ds/__init__.py b/adafruit_lsm6ds/__init__.py index b3a6046..451e0c4 100644 --- a/adafruit_lsm6ds/__init__.py +++ b/adafruit_lsm6ds/__init__.py @@ -174,7 +174,7 @@ class LSM6DS: # pylint: disable=too-many-instance-attributes # Structs _raw_accel_data = Struct(_LSM6DS_OUTX_L_A, " Date: Sun, 25 Apr 2021 11:50:31 -0400 Subject: [PATCH 3/6] black --- adafruit_lsm6ds/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/adafruit_lsm6ds/__init__.py b/adafruit_lsm6ds/__init__.py index 451e0c4..ff0438b 100644 --- a/adafruit_lsm6ds/__init__.py +++ b/adafruit_lsm6ds/__init__.py @@ -163,8 +163,8 @@ class LSM6DS: # pylint: disable=too-many-instance-attributes """Driver for the LSM6DSOX 6-axis accelerometer and gyroscope. - :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to. - :param address: The I2C slave address of the sensor + :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to. + :param address: The I2C slave address of the sensor """ @@ -175,13 +175,12 @@ class LSM6DS: # pylint: disable=too-many-instance-attributes _raw_accel_data = Struct(_LSM6DS_OUTX_L_A, " Date: Sun, 25 Apr 2021 11:57:52 -0400 Subject: [PATCH 4/6] add docstring --- adafruit_lsm6ds/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adafruit_lsm6ds/__init__.py b/adafruit_lsm6ds/__init__.py index ff0438b..0c8a750 100644 --- a/adafruit_lsm6ds/__init__.py +++ b/adafruit_lsm6ds/__init__.py @@ -252,6 +252,7 @@ def _add_accel_ranges(): @property def temperature(self): + """The temperature, in degrees Celsius.""" raw_temp_data = self._raw_temp_data temperature_raw = raw_temp_data[0] | (raw_temp_data[1] << 8) From 41cb99e9f66314ccb56a7ead9d8ec31be6d47fea Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 25 Apr 2021 12:36:59 -0400 Subject: [PATCH 5/6] modernize terminology --- adafruit_lsm6ds/__init__.py | 2 +- adafruit_lsm6ds/ism330dhcx.py | 2 +- adafruit_lsm6ds/lsm6ds33.py | 2 +- adafruit_lsm6ds/lsm6dso32.py | 2 +- adafruit_lsm6ds/lsm6dsox.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adafruit_lsm6ds/__init__.py b/adafruit_lsm6ds/__init__.py index 0c8a750..fac91e3 100644 --- a/adafruit_lsm6ds/__init__.py +++ b/adafruit_lsm6ds/__init__.py @@ -164,7 +164,7 @@ class LSM6DS: # pylint: disable=too-many-instance-attributes """Driver for the LSM6DSOX 6-axis accelerometer and gyroscope. :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to. - :param address: The I2C slave address of the sensor + :param address: The I2C address of the sensor """ diff --git a/adafruit_lsm6ds/ism330dhcx.py b/adafruit_lsm6ds/ism330dhcx.py index fb971ee..ec00c08 100644 --- a/adafruit_lsm6ds/ism330dhcx.py +++ b/adafruit_lsm6ds/ism330dhcx.py @@ -15,7 +15,7 @@ class ISM330DHCX(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DS33 6-axis accelerometer and gyroscope. :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to. - :param address: The I2C slave address of the sensor + :param address: The I2C address of the sensor """ diff --git a/adafruit_lsm6ds/lsm6ds33.py b/adafruit_lsm6ds/lsm6ds33.py index dd97297..53216d6 100644 --- a/adafruit_lsm6ds/lsm6ds33.py +++ b/adafruit_lsm6ds/lsm6ds33.py @@ -12,7 +12,7 @@ class LSM6DS33(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DS33 6-axis accelerometer and gyroscope. :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to. - :param address: The I2C slave address of the sensor + :param address: The I2C address of the sensor """ diff --git a/adafruit_lsm6ds/lsm6dso32.py b/adafruit_lsm6ds/lsm6dso32.py index 655c120..5a8a1ab 100644 --- a/adafruit_lsm6ds/lsm6dso32.py +++ b/adafruit_lsm6ds/lsm6dso32.py @@ -12,7 +12,7 @@ class LSM6DSO32(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DSO32 6-axis accelerometer and gyroscope. :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSO32 is connected to. - :param address: The I2C slave address of the sensor + :param address: The I2C address of the sensor """ diff --git a/adafruit_lsm6ds/lsm6dsox.py b/adafruit_lsm6ds/lsm6dsox.py index 093d856..d760afd 100644 --- a/adafruit_lsm6ds/lsm6dsox.py +++ b/adafruit_lsm6ds/lsm6dsox.py @@ -12,7 +12,7 @@ class LSM6DSOX(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DSOX 6-axis accelerometer and gyroscope. :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to. - :param address: The I2C slave address of the sensor + :param address: The I2C address of the sensor """ From f6748a3737e739e1815ef65f6d29b5052cc7f3ab Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 25 Apr 2021 12:49:06 -0400 Subject: [PATCH 6/6] black again --- adafruit_lsm6ds/ism330dhcx.py | 4 ++-- adafruit_lsm6ds/lsm6ds33.py | 4 ++-- adafruit_lsm6ds/lsm6dso32.py | 4 ++-- adafruit_lsm6ds/lsm6dsox.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/adafruit_lsm6ds/ism330dhcx.py b/adafruit_lsm6ds/ism330dhcx.py index 11067eb..02f7d39 100644 --- a/adafruit_lsm6ds/ism330dhcx.py +++ b/adafruit_lsm6ds/ism330dhcx.py @@ -14,8 +14,8 @@ class ISM330DHCX(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DS33 6-axis accelerometer and gyroscope. - :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to. - :param address: The I2C address of the sensor + :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to. + :param address: The I2C address of the sensor """ CHIP_ID = 0x6B diff --git a/adafruit_lsm6ds/lsm6ds33.py b/adafruit_lsm6ds/lsm6ds33.py index f484279..22e0e7c 100644 --- a/adafruit_lsm6ds/lsm6ds33.py +++ b/adafruit_lsm6ds/lsm6ds33.py @@ -11,8 +11,8 @@ class LSM6DS33(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DS33 6-axis accelerometer and gyroscope. - :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to. - :param address: The I2C address of the sensor + :param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to. + :param address: The I2C address of the sensor """ CHIP_ID = 0x69 diff --git a/adafruit_lsm6ds/lsm6dso32.py b/adafruit_lsm6ds/lsm6dso32.py index 8c331ad..058a5c1 100644 --- a/adafruit_lsm6ds/lsm6dso32.py +++ b/adafruit_lsm6ds/lsm6dso32.py @@ -11,8 +11,8 @@ class LSM6DSO32(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DSO32 6-axis accelerometer and gyroscope. - :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSO32 is connected to. - :param address: The I2C address of the sensor + :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSO32 is connected to. + :param address: The I2C address of the sensor """ CHIP_ID = LSM6DS_CHIP_ID diff --git a/adafruit_lsm6ds/lsm6dsox.py b/adafruit_lsm6ds/lsm6dsox.py index 609319e..f7763a1 100644 --- a/adafruit_lsm6ds/lsm6dsox.py +++ b/adafruit_lsm6ds/lsm6dsox.py @@ -11,8 +11,8 @@ class LSM6DSOX(LSM6DS): # pylint: disable=too-many-instance-attributes """Driver for the LSM6DSOX 6-axis accelerometer and gyroscope. - :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to. - :param address: The I2C address of the sensor + :param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to. + :param address: The I2C address of the sensor """ CHIP_ID = LSM6DS_CHIP_ID