HW-6.1

Fork of MMA8451Q by Emilio Monti

Files at this revision

API Documentation at this revision

Comitter:
mireyarod23
Date:
Wed Feb 22 05:22:33 2017 +0000
Parent:
7:2a107e6e0df4
Child:
9:e26c73f357a5
Commit message:
changes;

Changed in this revision

MMA8451Q.cpp Show annotated file Show diff for this revision Revisions of this file
MMA8451Q.h Show annotated file Show diff for this revision Revisions of this file
--- a/MMA8451Q.cpp	Wed Feb 22 05:14:56 2017 +0000
+++ b/MMA8451Q.cpp	Wed Feb 22 05:22:33 2017 +0000
@@ -43,7 +43,7 @@
 
 void MMA8451Q::setGLImit()
 {
-    uint8_t data[2] = {REG_CTRL_REG_1, 0X01};
+    uint8_t data[2] = {REG_CTRL_REG_1, 0x00};
     writeRegs(data, 2); //put in standby
     data[0] = XYZ_DATA_CFG;
     data[1] = 0x02;
--- a/MMA8451Q.h	Wed Feb 22 05:14:56 2017 +0000
+++ b/MMA8451Q.h	Wed Feb 22 05:22:33 2017 +0000
@@ -100,6 +100,8 @@
   
   int16_t getAccAxis(uint8_t addr);
   
+  void setGLImit();
+  
 private:
   I2C m_i2c;
   int m_addr;