1+ # SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries
2+ #
3+ # SPDX-License-Identifier: MIT
4+
15# Adafruit LIS3DH Accelerometer CircuitPython Driver
26# Based on the Arduino LIS3DH driver from:
37# https://github.com/adafruit/Adafruit_LIS3DH/
4- # Author: Tony DiCola
5- # License: MIT License (https://en.wikipedia.org/wiki/MIT_License)
68"""
79`adafruit_lis3dh`
810====================================================
@@ -114,9 +116,9 @@ def __init__(self, int1=None, int2=None):
114116 @property
115117 def data_rate (self ):
116118 """The data rate of the accelerometer. Can be DATA_RATE_400_HZ, DATA_RATE_200_HZ,
117- DATA_RATE_100_HZ, DATA_RATE_50_HZ, DATA_RATE_25_HZ, DATA_RATE_10_HZ,
118- DATA_RATE_1_HZ, DATA_RATE_POWERDOWN, DATA_RATE_LOWPOWER_1K6HZ, or
119- DATA_RATE_LOWPOWER_5KHZ."""
119+ DATA_RATE_100_HZ, DATA_RATE_50_HZ, DATA_RATE_25_HZ, DATA_RATE_10_HZ,
120+ DATA_RATE_1_HZ, DATA_RATE_POWERDOWN, DATA_RATE_LOWPOWER_1K6HZ, or
121+ DATA_RATE_LOWPOWER_5KHZ."""
120122 ctl1 = self ._read_register_byte (_REG_CTRL1 )
121123 return (ctl1 >> 4 ) & 0x0F
122124
@@ -130,7 +132,7 @@ def data_rate(self, rate):
130132 @property
131133 def range (self ):
132134 """The range of the accelerometer. Can be RANGE_2_G, RANGE_4_G, RANGE_8_G, or
133- RANGE_16_G."""
135+ RANGE_16_G."""
134136 ctl4 = self ._read_register_byte (_REG_CTRL4 )
135137 return (ctl4 >> 4 ) & 0x03
136138
@@ -179,7 +181,7 @@ def shake(self, shake_threshold=30, avg_count=10, total_delay=0.1):
179181
180182 :param total_delay: The total time in seconds it takes to obtain avg_count
181183 readings from acceleration. (Default 0.1)
182- """
184+ """
183185 shake_accel = (0 , 0 , 0 )
184186 for _ in range (avg_count ):
185187 # shake_accel creates a list of tuples from acceleration data.
0 commit comments