-
Notifications
You must be signed in to change notification settings - Fork 54
Add qmc5883p #802
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
Add qmc5883p #802
Conversation
b7957ab
to
af8c742
Compare
af8c742
to
1ef9d16
Compare
@tyeth is this blocking on anything? |
In theory it's not blocked, and I tested fine on the esp8266 which I'd wanted to verify worked with the square root float function. In my initial writing+testing on another device (s3) I had the sensor not behaving as expected in normal mode, the gauss value was flatlining with the same high signal, starting at the correct value and dropping rapidly in the next reading, but working fine in continuous mode. I also saw it refuse to return data in one boot cycle (all readings not high enough / valid). It's taken me 2days to find the other QMC chip which is untouched in theory, so I can check the value of that register before setting it, and see if normal mode behaves weirdly. I've got uncommitted changes locally right now, but just a brutal loop on isDataReady with serial print which never failed ever. I'll check the 2nd unit tomorrow, but worth you ordering one @brentru |
Yeah nothing useful really from testing arduino example. The second sensor I have showed the default value for the undocumented Sign of X/Y/Z register (0x29) showed an initial value of 0 rather than 0x06 as the datasheet application examples showed should be set. |
@brentru this is ready for review (and unblocked) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyeth Two questions but looks great
src/components/i2c/drivers/WipperSnapper_I2C_Driver_QMC5883P.cpp
Outdated
Show resolved
Hide resolved
I've moved the math.h include as suggested (thanks), and explained I'd prefer to keep the XYZ logging for now in v1 as the user is likely to want to see it when things go wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyeth LGTM
Adds the QMC5883P triple axis magnetic sensor