Library to communicate with a ST LIS331DLH

Files at this revision

API Documentation at this revision

Comitter:
atommota
Date:
Fri Jul 01 21:07:25 2011 +0000
Parent:
7:7eeb1fe4d787
Child:
9:5af73355984f
Commit message:
Fixed bug that returned int instead of float for X and Y axis.

Changed in this revision

LIS331.cpp Show annotated file Show diff for this revision Revisions of this file
LIS331.h Show annotated file Show diff for this revision Revisions of this file
--- a/LIS331.cpp	Wed Feb 16 21:12:59 2011 +0000
+++ b/LIS331.cpp	Fri Jul 01 21:07:25 2011 +0000
@@ -163,7 +163,7 @@
 
 
 
-int LIS331::getAccelX(void){
+float LIS331::getAccelX(void){
 
     char tx = ACCEL_XOUT_H_REG;
     char rx[2];
@@ -178,7 +178,7 @@
 
 }
 
-int LIS331::getAccelY(void){
+float LIS331::getAccelY(void){
 
     char tx = ACCEL_YOUT_H_REG;
     char rx[2];
--- a/LIS331.h	Wed Feb 16 21:12:59 2011 +0000
+++ b/LIS331.h	Fri Jul 01 21:07:25 2011 +0000
@@ -195,14 +195,14 @@
      *
      * @return The output on the x-axis in engineering units (g's).
      */
-    int getAccelX(void);
+    float getAccelX(void);
 
     /**
      * Get the output for the y-axis accelerometer.
      *
      * @return The output on the y-axis in engineering units (g's).
      */
-    int getAccelY(void);
+    float getAccelY(void);
 
     /**
      * Get the output on the z-axis accelerometer.