1- # The MIT License (MIT)
1+ # SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries
22#
3- # Copyright (c) 2017 Tony DiCola for Adafruit Industries
4- #
5- # Permission is hereby granted, free of charge, to any person obtaining a copy
6- # of this software and associated documentation files (the "Software"), to deal
7- # in the Software without restriction, including without limitation the rights
8- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9- # copies of the Software, and to permit persons to whom the Software is
10- # furnished to do so, subject to the following conditions:
11- #
12- # The above copyright notice and this permission notice shall be included in
13- # all copies or substantial portions of the Software.
14- #
15- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21- # THE SOFTWARE.
3+ # SPDX-License-Identifier: MIT
4+
225"""
236`adafruit_lsm9ds0`
247====================================================
@@ -176,11 +159,11 @@ def __init__(self):
176159 @property
177160 def accel_range (self ):
178161 """The accelerometer range. Must be a value of:
179- - ACCELRANGE_2G
180- - ACCELRANGE_4G
181- - ACCELRANGE_6G
182- - ACCELRANGE_8G
183- - ACCELRANGE_16G
162+ - ACCELRANGE_2G
163+ - ACCELRANGE_4G
164+ - ACCELRANGE_6G
165+ - ACCELRANGE_8G
166+ - ACCELRANGE_16G
184167 """
185168 reg = self ._read_u8 (_XMTYPE , _LSM9DS0_REGISTER_CTRL_REG2_XM )
186169 return (reg & 0b00111000 ) & 0xFF
@@ -212,10 +195,10 @@ def accel_range(self, val):
212195 @property
213196 def mag_gain (self ):
214197 """The magnetometer gain. Must be a value of:
215- - MAGGAIN_2GAUSS
216- - MAGGAIN_4GAUSS
217- - MAGGAIN_8GAUSS
218- - MAGGAIN_12GAUSS
198+ - MAGGAIN_2GAUSS
199+ - MAGGAIN_4GAUSS
200+ - MAGGAIN_8GAUSS
201+ - MAGGAIN_12GAUSS
219202 """
220203 reg = self ._read_u8 (_XMTYPE , _LSM9DS0_REGISTER_CTRL_REG6_XM )
221204 return (reg & 0b01100000 ) & 0xFF
@@ -239,9 +222,9 @@ def mag_gain(self, val):
239222 @property
240223 def gyro_scale (self ):
241224 """The gyroscope scale. Must be a value of:
242- - GYROSCALE_245DPS
243- - GYROSCALE_500DPS
244- - GYROSCALE_2000DPS
225+ - GYROSCALE_245DPS
226+ - GYROSCALE_500DPS
227+ - GYROSCALE_2000DPS
245228 """
246229 reg = self ._read_u8 (_GYROTYPE , _LSM9DS0_REGISTER_CTRL_REG4_G )
247230 return (reg & 0b00110000 ) & 0xFF
0 commit comments