projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d3fe7e
)
altos: Change ao_mpu6000_gyro arg to float
author
Keith Packard
<keithp@keithp.com>
Mon, 28 Oct 2013 06:42:58 +0000
(23:42 -0700)
committer
Keith Packard
<keithp@keithp.com>
Mon, 28 Oct 2013 06:42:58 +0000
(23:42 -0700)
This lets callers pass more precision than just the original sensor value
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 2241bf80b6e5fc01dafebf2e1492486b40c83292..dc3a9fbfa0e9f664d15f04726641ffd306edc104 100644
(file)
--- a/
src/drivers/ao_mpu6000.h
+++ b/
src/drivers/ao_mpu6000.h
@@
-173,8
+173,8
@@
#define MPU6000_GYRO_FULLSCALE ((float) 2000 * M_PI/180.0)
static inline float
-ao_mpu6000_gyro(
int16_
t sensor) {
- return
(float)
sensor * ((float) (MPU6000_GYRO_FULLSCALE / 32767.0));
+ao_mpu6000_gyro(
floa
t sensor) {
+ return sensor * ((float) (MPU6000_GYRO_FULLSCALE / 32767.0));
}
#define MPU6000_ACCEL_FULLSCALE 16