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
Conversation
Fixes #6120. |
@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. |
@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. |
No sorry. I had one but now is dead, so I can't verify this. |
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)... |
@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. |
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.