projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5caf56e
)
altos: Define full-scale gyro and accel values for MPU6000
author
Keith Packard
<keithp@keithp.com>
Sat, 13 Oct 2012 22:04:00 +0000
(15:04 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sat, 13 Oct 2012 22:04:00 +0000
(15:04 -0700)
This lets other code convert MPU6000 readings into canonical units
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_mpu6000.h
patch
|
blob
|
history
diff --git
a/src/drivers/ao_mpu6000.h
b/src/drivers/ao_mpu6000.h
index ca76b08128ddc3888cb611f30a295b5f9cbdd6bc..5c0cee1b1184e02dcfdcf340e815ae3f4a75cac5 100644
(file)
--- 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;