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.
Dependents: minimu-9v2 air_zuma Fish_2014Fall DiscoveryF3-LSM303_Compass ... more
Fork of LSM303DLH by
Diff: LSM303DLH.h
- Revision:
- 1:48d83c63d1d9
- Parent:
- 0:de767f4959ef
- Child:
- 2:aea5caec809c
--- a/LSM303DLH.h Wed Apr 06 05:05:10 2011 +0000
+++ b/LSM303DLH.h Fri Apr 08 07:29:51 2011 +0000
@@ -1,4 +1,11 @@
-/** LSM303DLH Interface Library
+#include "mbed.h"
+#include "vector.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+/** Tilt-compensated compass interface Library for the STMicro LSM303DLH 3-axis magnetometer, 3-axis acceleromter
*
* Michael Shimniok http://bot-thoughts.com
*
@@ -52,14 +59,8 @@
* wait(0.1);
* }
* }
+ * @endcode
*/
-#include "mbed.h"
-#include "vector.h"
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
class LSM303DLH {
public:
@@ -122,7 +123,10 @@
float _scale_x;
float _scale_y;
float _scale_z;
-
+ long _filt_ax;
+ long _filt_ay;
+ long _filt_az;
+
bool write_reg(int addr_i2c,int addr_reg, char v);
bool read_reg(int addr_i2c,int addr_reg, char *v);
bool read_reg_short(int addr_i2c,int addr_reg, short *v);
