Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong QMC5883L mag detection #6121

Merged
merged 1 commit into from Jun 17, 2018
Merged

Conversation

MJ666
Copy link
Contributor

@MJ666 MJ666 commented Jun 14, 2018

Proposed fix for erroneous QMC5883L mag detection. Issue #6120. Fix need to be tested on FC's with QMC5883L. May be the mode bits in status register need to be masked for proper detection? Looking forward for feedback and test results.

@mikeller mikeller added this to the Betaflight v3.4 milestone Jun 16, 2018
@mikeller
Copy link
Member

Fixes #6120.

@MJ666
Copy link
Contributor Author

MJ666 commented Jun 16, 2018

@mikeller are you able to test this succesfully with an QMC5883L? There is also the option to disable detection completely if the SPI bus should be used for this sensor. Unlike the HMC the QMC does not support SPI at all.

@mikeller
Copy link
Member

@MJ666: No, I don't have the hardware. Will wait to see if somebody can confirm (I think @McGiverGim might have the hardware), and then put it into an RC for 3.4.

@McGiverGim
Copy link
Member

No sorry. I had one but now is dead, so I can't verify this.

@jeffystockes
Copy link

With a Matek F722-STD and QCM5883L on I2C via SDA/SCL pad, the auto detection is OK but I have 1 i2c error added. If I declare in cli the mag (set mag_hardware=QCM5883L), I lost the i2c error, and the mag detection is OK. I'm not sure that the mag works correctly (the variation of heading seam correct but i'm not sure the value of heading is OK, but i don't test it outdoor)...

@MJ666
Copy link
Contributor Author

MJ666 commented Jun 16, 2018

@mikeller , @McGiverGim , @jeffystockes Thanks for all the feedback. Normally this fix should not add an I2C error. Usually the I2C errors com from probing nonresistant sensors. The patch will only influence sensor detecting and will not change the behavior for the sensor values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants