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

@ -22,15 +22,15 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
var accelrCompassSensor = require('jsupm_lsm303');
var accelrCompassSensor = require('jsupm_lsm303dlh');
// Instantiate LSM303 compass on I2C
var myAccelrCompass = new accelrCompassSensor.LSM303(0);
// Instantiate LSM303DLH compass on I2C
var myAccelrCompass = new accelrCompassSensor.LSM303DLH(0);
var successFail, coords, outputStr, accel;
var myInterval = setInterval(function()
{
// 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