Add support for the QMC5883p, and general cleanup in drivers #132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the QMC5883P, as well as the WHOAMI, as per my own research and the datasheet.
Sadly, I needed to modify the scan code to special case it, as it wasn't always detected when using it over the secondary I2C data lines of a IMU. It will sometimes work without it, but it isn't 100% reliable, so I feel it's better to have done so.
See the datasheet: https://www.qstcorp.com/upload/pdf/202202/%EF%BC%88%E5%B7%B2%E4%BC%A0%EF%BC%8913-52-19%20QMC5883P%20Datasheet%20Rev.C(1).pdf
I ended up modifying the BMI270 to clearly have the name, for clarity. I know this project does not support other BMI chips, but my personal fork may end up doing so. (even though a PR will never be made, so no one has to maintain it). If needed, I can revert it, but I see no harm.
The other thing I did was remove some miscellaneous whitespaces in some of the calibration and scan code.
From my previous PR, with more comments for clarity on why certain things were done.