-
Notifications
You must be signed in to change notification settings - Fork 131
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
Magnetometer BLE service calibration states #425
Comments
Thanks @microbit-sam for updating the docs (as noted in #412 (comment)) with some more information about calibration and values. It does not answer the question about how I detect if I need to calibrate the magnetometer or not. The introduction of this calibration characteristic seems a backwards and unnecessary development. When I use the magnetometer without Bluetooth I do not have manage if the device needs calibration. If I use the heading value the device promotes for calibration if it needs it. Previously that is what the Bluetooth magnetometer service also did. When I started the service it would prompt the user to calibrate the magnetometer if it required it. I have tried to have a discussion about this on Slack and now here. |
Hi Barry, sorry I'm not very active on Slack so will have missed any discussion on there This commit prevents the compass from automatically triggering calibration, I think (may be misremembering) this was added so for cases where a device has a malfunctioning mag/acc would not be able to get past the calibration screen, although if that is the case perhaps a timeout / escape key would be better.. @finneyj is that right? Calling |
The calibration behaviour has been changed on the magnetometer... no auto-calibration when you instantiate the magnetometer service like previously. This results in no notifications or readings until calibration has been performed.
I can trigger a calibration by sending 0x01 to the new characteristic (e95db358-251d-470a-a062-fa1922dfa9a8).
I am writing Python on a Raspberry Pi to interact with the micro:bit. Not sure how to modify my code to handle this change. After issuing the 'calibrate' command, there does not seem a clean way to know when the calibration is finished. Also there doesn't seem to be a clean way to tell if this is the first time the device has been used and needs calibration. Anyone got any thoughts on this?
The text was updated successfully, but these errors were encountered: