aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/drv_mag.h
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-08-20 20:02:06 +0200
committerJulian Oes <julian@oes.ch>2013-08-20 20:02:06 +0200
commitf5c92314f16fde650ee6f2f4fa20b7c2680a4b00 (patch)
tree9bc236d6c9f3baae999ff94bfb88701e5b93cd07 /src/drivers/drv_mag.h
parent307c9e52c775de2ce09ff4abf0bc1fb5db6dd41e (diff)
downloadpx4-firmware-f5c92314f16fde650ee6f2f4fa20b7c2680a4b00.tar.gz
px4-firmware-f5c92314f16fde650ee6f2f4fa20b7c2680a4b00.tar.bz2
px4-firmware-f5c92314f16fde650ee6f2f4fa20b7c2680a4b00.zip
Improved LSM303D driver, plus some fixes to the HMC5883
Diffstat (limited to 'src/drivers/drv_mag.h')
-rw-r--r--src/drivers/drv_mag.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/drivers/drv_mag.h b/src/drivers/drv_mag.h
index e95034e8e..3de5625fd 100644
--- a/src/drivers/drv_mag.h
+++ b/src/drivers/drv_mag.h
@@ -90,28 +90,37 @@ ORB_DECLARE(sensor_mag);
/** set the mag internal sample rate to at least (arg) Hz */
#define MAGIOCSSAMPLERATE _MAGIOC(0)
+/** return the mag internal sample rate in Hz */
+#define MAGIOCGSAMPLERATE _MAGIOC(1)
+
/** set the mag internal lowpass filter to no lower than (arg) Hz */
-#define MAGIOCSLOWPASS _MAGIOC(1)
+#define MAGIOCSLOWPASS _MAGIOC(2)
+
+/** return the mag internal lowpass filter in Hz */
+#define MAGIOCGLOWPASS _MAGIOC(3)
/** set the mag scaling constants to the structure pointed to by (arg) */
-#define MAGIOCSSCALE _MAGIOC(2)
+#define MAGIOCSSCALE _MAGIOC(4)
/** copy the mag scaling constants to the structure pointed to by (arg) */
-#define MAGIOCGSCALE _MAGIOC(3)
+#define MAGIOCGSCALE _MAGIOC(5)
/** set the measurement range to handle (at least) arg Gauss */
-#define MAGIOCSRANGE _MAGIOC(4)
+#define MAGIOCSRANGE _MAGIOC(6)
+
+/** return the current mag measurement range in Gauss */
+#define MAGIOCGRANGE _MAGIOC(7)
/** perform self-calibration, update scale factors to canonical units */
-#define MAGIOCCALIBRATE _MAGIOC(5)
+#define MAGIOCCALIBRATE _MAGIOC(8)
/** excite strap */
-#define MAGIOCEXSTRAP _MAGIOC(6)
+#define MAGIOCEXSTRAP _MAGIOC(9)
/** perform self test and report status */
-#define MAGIOCSELFTEST _MAGIOC(7)
+#define MAGIOCSELFTEST _MAGIOC(10)
/** determine if mag is external or onboard */
-#define MAGIOCGEXTERNAL _MAGIOC(8)
+#define MAGIOCGEXTERNAL _MAGIOC(11)
#endif /* _DRV_MAG_H */