From 0b784c20c8bf69cee281f6717f055b0309d331b1 Mon Sep 17 00:00:00 2001 From: hauptmech Date: Wed, 28 Jan 2015 15:45:00 +1300 Subject: Save and check device id for acc and gyro calibration parameters. 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 --- src/modules/sensors/sensor_params.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/modules/sensors/sensor_params.c') 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 @@ -44,6 +44,13 @@ #include #include +/** + * ID of the Gyro that the calibration is for. + * + * @group Sensor Calibration + */ +PARAM_DEFINE_INT32(SENS_GYRO_ID, 0); + /** * Gyro X-axis offset * @@ -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 -- cgit v1.2.3