aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/drv_sensor.h
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/drivers/drv_sensor.h
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/drivers/drv_sensor.h')
-rw-r--r--src/drivers/drv_sensor.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/drivers/drv_sensor.h b/src/drivers/drv_sensor.h
index 5e4598de8..467dace08 100644
--- a/src/drivers/drv_sensor.h
+++ b/src/drivers/drv_sensor.h
@@ -43,6 +43,24 @@
#include <stdint.h>
#include <sys/ioctl.h>
+#include "drv_device.h"
+
+/**
+ * Sensor type definitions.
+ *
+ * Used to create a unique device id for redundant and combo sensors
+ */
+
+#define DRV_MAG_DEVTYPE_HMC5883 0x01
+#define DRV_MAG_DEVTYPE_LSM303D 0x02
+#define DRV_ACC_DEVTYPE_LSM303D 0x11
+#define DRV_ACC_DEVTYPE_BMA180 0x12
+#define DRV_ACC_DEVTYPE_MPU6000 0x13
+#define DRV_GYR_DEVTYPE_MPU6000 0x21
+#define DRV_GYR_DEVTYPE_L3GD20 0x22
+#define DRV_RNG_DEVTYPE_MB12XX 0x31
+#define DRV_RNG_DEVTYPE_LL40LS 0x32
+
/*
* ioctl() definitions
*