From 195fd70cdc7f519cd8d4ac323088ed0b6c188280 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 27 Oct 2013 23:42:58 -0700 Subject: [PATCH] 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 --- src/drivers/ao_mpu6000.h | 4 ++-- 1 file 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 -- 2.30.2