aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/drv_mag.h
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-08-21 22:05:42 -0700
committerpx4dev <px4@purgatory.org>2012-08-21 22:05:42 -0700
commit5f77561ed4fb6b8347a7c848f0d02d7aeaa21c3f (patch)
treedbf32585da2e5146e0fe7a48cda114b9753b2b12 /apps/drivers/drv_mag.h
parent63831fa908f9deb848c20433c0235554b261bec3 (diff)
downloadpx4-firmware-5f77561ed4fb6b8347a7c848f0d02d7aeaa21c3f.tar.gz
px4-firmware-5f77561ed4fb6b8347a7c848f0d02d7aeaa21c3f.tar.bz2
px4-firmware-5f77561ed4fb6b8347a7c848f0d02d7aeaa21c3f.zip
Fix output scaling for the hmc5883 driver. Add data checking, and fix an issue where the ORB topic could not be published due to being advertised in the wrong context.
Diffstat (limited to 'apps/drivers/drv_mag.h')
-rw-r--r--apps/drivers/drv_mag.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/drivers/drv_mag.h b/apps/drivers/drv_mag.h
index fe1addaeb..a59291778 100644
--- a/apps/drivers/drv_mag.h
+++ b/apps/drivers/drv_mag.h
@@ -48,6 +48,8 @@
/**
* mag report structure. Reads from the device must be in multiples of this
* structure.
+ *
+ * Output values are in gauss.
*/
struct mag_report {
float x;
@@ -99,4 +101,10 @@ ORB_DECLARE(sensor_mag);
/** set the mag scaling constants to the structure pointed to by (arg) */
#define MAGIOCSSCALE _MAGIOC(5)
+/** copy the mag scaling constants to the structure pointed to by (arg) */
+#define MAGIOCGSCALE _MAGIOC(6)
+
+/** perform self-calibration, update scale factors to canonical units */
+#define MAGIOCCALIBRATE _MAGIOC(7)
+
#endif /* _DRV_MAG_H */