aboutsummaryrefslogtreecommitdiff
path: root/src/modules/sensors/sensor_params.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2015-02-14 16:03:27 +0100
committerLorenz Meier <lm@inf.ethz.ch>2015-02-15 19:52:01 +0100
commit12ae9841984e454eb2b49c206094f2c7bb59e687 (patch)
tree0f640efac94c655480901b9c33ef3ba889320944 /src/modules/sensors/sensor_params.c
parent3d195bc7cc41885e3328ae38c8a1afc53e0d7893 (diff)
downloadpx4-firmware-12ae9841984e454eb2b49c206094f2c7bb59e687.tar.gz
px4-firmware-12ae9841984e454eb2b49c206094f2c7bb59e687.tar.bz2
px4-firmware-12ae9841984e454eb2b49c206094f2c7bb59e687.zip
sensors app: Use -1 in rotation parameter to indicate that a sensor cannot be rotated as it is internal.
Diffstat (limited to 'src/modules/sensors/sensor_params.c')
-rw-r--r--src/modules/sensors/sensor_params.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/modules/sensors/sensor_params.c b/src/modules/sensors/sensor_params.c
index a80ca4eb6..3e21ec2a9 100644
--- a/src/modules/sensors/sensor_params.c
+++ b/src/modules/sensors/sensor_params.c
@@ -122,6 +122,12 @@ PARAM_DEFINE_INT32(CAL_MAG0_ID, 0);
/**
* Rotation of magnetometer 0 relative to airframe.
*
+ * An internal magnetometer will force a value of -1, so a GCS
+ * should only attempt to configure the rotation if the value is
+ * greater than or equal to zero.
+ *
+ * @min -1
+ * @max 30
* @group Sensor Calibration
*/
PARAM_DEFINE_INT32(CAL_MAG0_ROT, 0);
@@ -292,8 +298,14 @@ PARAM_DEFINE_FLOAT(CAL_GYRO1_ZSCALE, 1.0f);
PARAM_DEFINE_INT32(CAL_MAG1_ID, 0);
/**
- * Rotation of magnetometer 0 relative to airframe.
+ * Rotation of magnetometer 1 relative to airframe.
+ *
+ * An internal magnetometer will force a value of -1, so a GCS
+ * should only attempt to configure the rotation if the value is
+ * greater than or equal to zero.
*
+ * @min -1
+ * @max 30
* @group Sensor Calibration
*/
PARAM_DEFINE_INT32(CAL_MAG1_ROT, 0);
@@ -464,8 +476,14 @@ PARAM_DEFINE_FLOAT(CAL_GYRO2_ZSCALE, 1.0f);
PARAM_DEFINE_INT32(CAL_MAG2_ID, 0);
/**
- * Rotation of magnetometer 0 relative to airframe.
+ * Rotation of magnetometer 2 relative to airframe.
+ *
+ * An internal magnetometer will force a value of -1, so a GCS
+ * should only attempt to configure the rotation if the value is
+ * greater than or equal to zero.
*
+ * @min -1
+ * @max 30
* @group Sensor Calibration
*/
PARAM_DEFINE_INT32(CAL_MAG2_ROT, 0);