Merge pull request #40 from tfx2001/patch-1
Fix bug when convert raw gyro data to rad/s
This commit is contained in:
commit
11554dee66
1 changed files with 1 additions and 1 deletions
|
@ -364,7 +364,7 @@ where
|
||||||
pub fn get_gyro(&mut self) -> Result<Vector3<f32>, Mpu6050Error<E>> {
|
pub fn get_gyro(&mut self) -> Result<Vector3<f32>, Mpu6050Error<E>> {
|
||||||
let mut gyro = self.read_rot(GYRO_REGX_H)?;
|
let mut gyro = self.read_rot(GYRO_REGX_H)?;
|
||||||
|
|
||||||
gyro *= PI_180 * self.gyro_sensitivity;
|
gyro *= PI_180 / self.gyro_sensitivity;
|
||||||
|
|
||||||
Ok(gyro)
|
Ok(gyro)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue