summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-10-13 15:04:00 -0700
committerKeith Packard <keithp@keithp.com>2012-10-13 15:04:00 -0700
commitc6eec0bec06d2e246ea3c9552818ad3180c1e318 (patch)
treee10c57458237c38075289171afe5232987377dd6 /src
parent5caf56e89678637c1afa79700a2fa09aa67dea9b (diff)
altos: Define full-scale gyro and accel values for MPU6000
This lets other code convert MPU6000 readings into canonical units Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/ao_mpu6000.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/ao_mpu6000.h b/src/drivers/ao_mpu6000.h
index ca76b081..5c0cee1b 100644
--- a/src/drivers/ao_mpu6000.h
+++ b/src/drivers/ao_mpu6000.h
@@ -145,6 +145,9 @@
/* Self test gyro is approximately 50°/s */
#define MPU6000_ST_GYRO(full_scale) ((int16_t) (((int32_t) 32767 * (int32_t) 50) / (full_scale)))
+#define MPU6000_GYRO_FULLSCALE 2000
+#define MPU6000_ACCEL_FULLSCALE 16
+
struct ao_mpu6000_sample {
int16_t accel_x;
int16_t accel_y;