1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

fixed MPU6050 sig stuff, d'oh

added sensor axis orientation stuff to cli... not the most optimal way but surely one that uses least code, lol!

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@228 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2012-10-08 13:50:48 +00:00
parent 021b486916
commit 9fc43d5357
3 changed files with 1753 additions and 1727 deletions

View file

@ -160,8 +160,7 @@ bool mpu6050Detect(sensor_t * acc, sensor_t * gyro, uint8_t scale)
// The contents of WHO_AM_I are the upper 6 bits of the MPU-60X0s 7-bit I2C address.
// The least significant bit of the MPU-60X0s I2C address is determined by the value of the AD0 pin. (we know that already).
// But here's the best part: The value of the AD0 pin is not reflected in this register.
sig &= 0x7e;
if (sig != MPU6050_ADDRESS)
if (sig != (MPU6050_ADDRESS & 0x7e))
return false;
// get chip revision + fake it if needed