lsm303: rename to lsm303dlh

There are a variety of LSM303 devices out there with various
incompatibilities and differing capabilities.  The current lsm303
driver in UPM only supports the LSM303DLH variant, so it has been
renamed to lsm303dlh to avoid confusion and to make it clear which
variant is actually supported.

All examples and source files have been renamed, including header
files.  In addition, the class name, LSM303, has been renamed to
LSM303DLH.  No other functionality or behavior has been changed.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2017-04-12 11:49:20 -06:00
parent d9fd1af272
commit 19c58ebba2
13 changed files with 95 additions and 82 deletions

View File

@ -25,11 +25,11 @@
from __future__ import print_function
import time, sys, signal, atexit
from upm import pyupm_lsm303 as lsm303
from upm import pyupm_lsm303dlh as lsm303dlh
def main():
# Instantiate LSM303 compass on I2C
myAccelrCompass = lsm303.LSM303(0)
# Instantiate LSM303DLH compass on I2C
myAccelrCompass = lsm303dlh.LSM303DLH(0)
## Exit handlers ##
# This stops python from printing a stacktrace when you hit control-C
@ -47,7 +47,7 @@ def main():
signal.signal(signal.SIGINT, SIGINTHandler)
while(1):
# Load coordinates into LSM303 object
# Load coordinates into LSM303DLH object
successFail = myAccelrCompass.getCoordinates()
# in XYZ order. The sensor returns XZY,
# but the driver compensates and makes it XYZ