diff options
| author | Keith Packard <keithp@keithp.com> | 2017-12-02 15:32:38 -0600 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-12-02 15:52:43 -0600 | 
| commit | f0068719b17019c5cd7ed318364a0581caf64e1a (patch) | |
| tree | aed3ba2002e6337d4148887ecc3cb5ab5422965e /src/kernel/ao_sample.c | |
| parent | c31744299e5a4342bbe26d3735ee2d8f09192ae9 (diff) | |
altos/kernel: MPU9250 support
Use MPU9250 for accel, gyro and mag data in logging, telemetry and
flight status computations.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_sample.c')
| -rw-r--r-- | src/kernel/ao_sample.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/kernel/ao_sample.c b/src/kernel/ao_sample.c index f0ab0169..61519478 100644 --- a/src/kernel/ao_sample.c +++ b/src/kernel/ao_sample.c @@ -184,9 +184,9 @@ ao_sample_rotate(void)  #else  	static const float dt = 1/TIME_DIV;  #endif -	float	x = ao_mpu6000_gyro((float) ((ao_sample_pitch << 9) - ao_ground_pitch) / 512.0f) * dt; -	float	y = ao_mpu6000_gyro((float) ((ao_sample_yaw << 9) - ao_ground_yaw) / 512.0f) * dt; -	float	z = ao_mpu6000_gyro((float) ((ao_sample_roll << 9) - ao_ground_roll) / 512.0f) * dt; +	float	x = ao_convert_gyro((float) ((ao_sample_pitch << 9) - ao_ground_pitch) / 512.0f) * dt; +	float	y = ao_convert_gyro((float) ((ao_sample_yaw << 9) - ao_ground_yaw) / 512.0f) * dt; +	float	z = ao_convert_gyro((float) ((ao_sample_roll << 9) - ao_ground_roll) / 512.0f) * dt;  	struct ao_quaternion	rot;  	ao_quaternion_init_half_euler(&rot, x, y, z); | 
