Bug in r840 i2c refactoring

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
mgros
Posts: 90
Joined: Thu Jan 20, 2011 12:32 am

Bug in r840 i2c refactoring

Post by mgros »

There is and small bug in sensor.ino in r840 that mean no reading in MAG values
in line 1133
Says:

Code: Select all

    i2c_writeReg(MPU6050_ADDRESS, 0x25, 0x80|(MAG_ADDRESS>>1));//I2C_SLV0_ADDR -- I2C_SLV4_RW=1 (read operation) ; I2C_SLV4_ADDR=MAG_ADDRESS

should read:

Code: Select all

    i2c_writeReg(MPU6050_ADDRESS, 0x25, 0x80|(MAG_ADDRESS));//I2C_SLV0_ADDR -- I2C_SLV4_RW=1 (read operation) ; I2C_SLV4_ADDR=MAG_ADDRESS

At least for FEEIMUv043
The change on MAG_ADDRESS change the way of MPU6050 comunicate with MAG.
(tested)

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Bug in r840 i2c refactoring

Post by Alexinparis »

thank you.
howard told me this bug also.
The last change is quite important (I2C and GPS). I hope there is not too many bugs to fix.

Post Reply