aboutsummaryrefslogtreecommitdiff
path: root/src/modules/sensors/sensor_params.c
diff options
context:
space:
mode:
authorhauptmech <hauptmech@gmail.com>2015-01-28 15:45:00 +1300
committerLorenz Meier <lm@inf.ethz.ch>2015-01-31 15:53:34 +0100
commit0b784c20c8bf69cee281f6717f055b0309d331b1 (patch)
tree9de9bf48368b35e213569ee1f26fe9083790cc73 /src/modules/sensors/sensor_params.c
parente9bcc0a2624c77c6f71bb926347e85b8c7592e34 (diff)
downloadpx4-firmware-0b784c20c8bf69cee281f6717f055b0309d331b1.tar.gz
px4-firmware-0b784c20c8bf69cee281f6717f055b0309d331b1.tar.bz2
px4-firmware-0b784c20c8bf69cee281f6717f055b0309d331b1.zip
Save and check device id for acc and gyro calibration parameters.config_all_devices
Fix config utility to work with all devices of each type. Accel, gyro and mag devices correctly set their device_id devtype. Combo devices (mpu6000 lsm303d) now correctly return their devtype. config util shows device id for all sensor types. Add, save during calibration and check during preflight ID parameters for accelerometer and gyro
Diffstat (limited to 'src/modules/sensors/sensor_params.c')
-rw-r--r--src/modules/sensors/sensor_params.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/modules/sensors/sensor_params.c b/src/modules/sensors/sensor_params.c
index bf5708e0b..67b7feef7 100644
--- a/src/modules/sensors/sensor_params.c
+++ b/src/modules/sensors/sensor_params.c
@@ -45,6 +45,13 @@
#include <systemlib/param/param.h>
/**
+ * ID of the Gyro that the calibration is for.
+ *
+ * @group Sensor Calibration
+ */
+PARAM_DEFINE_INT32(SENS_GYRO_ID, 0);
+
+/**
* Gyro X-axis offset
*
* @min -10.0
@@ -153,6 +160,12 @@ PARAM_DEFINE_FLOAT(SENS_MAG_YSCALE, 1.0f);
*/
PARAM_DEFINE_FLOAT(SENS_MAG_ZSCALE, 1.0f);
+/**
+ * ID of the Accelerometer that the calibration is for.
+ *
+ * @group Sensor Calibration
+ */
+PARAM_DEFINE_INT32(SENS_ACC_ID, 0);
/**
* Accelerometer X-axis offset
@@ -270,7 +283,7 @@ PARAM_DEFINE_INT32(SENS_BOARD_ROT, 0);
/**
* PX4Flow board rotation
*
- * This parameter defines the rotation of the PX4FLOW board relative to the platform.
+ * This parameter defines the rotation of the PX4FLOW board relative to the platform.
* Zero rotation is defined as Y on flow board pointing towards front of vehicle
* Possible values are:
* 0 = No rotation