Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MMA8451Q by
Revision 5:be673a941b0f, committed 2017-01-13
- Comitter:
- marcus255
- Date:
- Fri Jan 13 01:10:28 2017 +0000
- Parent:
- 4:c4d879a39775
- Commit message:
- Initial version;
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 Fri Oct 12 11:35:07 2012 +0000
+++ b/MMA8451Q.cpp Fri Jan 13 01:10:28 2017 +0000
@@ -52,6 +52,18 @@
return (float(getAccAxis(REG_OUT_Z_MSB))/4096.0);
}
+int MMA8451Q::getUnsignedX() {
+ return getAccAxis(REG_OUT_X_MSB);
+}
+
+int MMA8451Q::getUnsignedY() {
+ return getAccAxis(REG_OUT_Y_MSB);
+}
+
+int MMA8451Q::getUnsignedZ() {
+ return getAccAxis(REG_OUT_Z_MSB);
+}
+
void MMA8451Q::getAccAllAxis(float * res) {
res[0] = getAccX();
res[1] = getAccY();
--- a/MMA8451Q.h Fri Oct 12 11:35:07 2012 +0000
+++ b/MMA8451Q.h Fri Jan 13 01:10:28 2017 +0000
@@ -89,7 +89,15 @@
*
* @returns Z axis acceleration
*/
- float getAccZ();
+ float getAccZ();
+
+ int getUnsignedX();
+
+ int getUnsignedY();
+
+ int getUnsignedZ();
+
+
/**
* Get XYZ axis acceleration
