summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-27 23:42:58 -0700
committerKeith Packard <keithp@keithp.com>2013-10-27 23:42:58 -0700
commit195fd70cdc7f519cd8d4ac323088ed0b6c188280 (patch)
tree4198249f32da3a8f3fad0d00f8ca29605a9097e4 /src
parent3d3fe7e9b6502432868f4430befac871dfea4869 (diff)
altos: Change ao_mpu6000_gyro arg to float
This lets callers pass more precision than just the original sensor value Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/ao_mpu6000.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/ao_mpu6000.h b/src/drivers/ao_mpu6000.h
index 2241bf80..dc3a9fbf 100644
--- 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(float sensor) {
+ return sensor * ((float) (MPU6000_GYRO_FULLSCALE / 32767.0));
}
#define MPU6000_ACCEL_FULLSCALE 16