altos: Change ao_mpu6000_gyro arg to float
authorKeith Packard <keithp@keithp.com>
Mon, 28 Oct 2013 06:42:58 +0000 (23:42 -0700)
committerKeith 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

index 2241bf80b6e5fc01dafebf2e1492486b40c83292..dc3a9fbfa0e9f664d15f04726641ffd306edc104 100644 (file)
 #define MPU6000_GYRO_FULLSCALE ((float) 2000 * M_PI/180.0)
 
 static inline float
 #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
 }
 
 #define MPU6000_ACCEL_FULLSCALE        16