1
Fork 0

fix: get_gyro convert error

This commit is contained in:
tfx2001 2021-08-13 11:44:26 +08:00 committed by GitHub
parent bc49e17aa9
commit dfeeec0202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -341,7 +341,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)
} }