mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
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:
@ -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
|
Reference in New Issue
Block a user