-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
AP_Compass: add IIS2MDC driver #28602
Conversation
c70d8ab
to
bd469e7
Compare
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.
Please fold the commits.
Please also outline the testing you've done.
eb6b153
to
ecd0b52
Compare
Done. Should I do a separate commit for Tools/? I assumed a single commit since this PR should be atomic.
Bench tested on the ARK FPV. I've uploaded the log file to Drive. |
553dc1f
to
6750137
Compare
@peterbarker can you let me know if there's anything else here you'd like to see? |
Is there anything else needed to get this merged? The ARK FPV board support depends on it. I've also uploaded a flight log in position mode demonstrating functionality |
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.
LGTM apart from the minor include issue
6750137
to
8e744eb
Compare
BTW, this driver will also work for the LIS2MDL. Just discovered this while doing a betaflight port board. ST says that this is basically just a better version of the LIS2MDL
|
This adds 1k to all the boards that include all the compasses, but none of them are using it. I think we should consider having this off by default or disabling by default one of the other compass drivers that is now little used. |
@andyp1per does ardupilot have a mechanism to enable only certain drivers for a target? For example in PX4 uses Kconfig |
Yes, just define the backends you need -
|
52c2908
to
4514de3
Compare
@andyp1per hmm it seems that I need to change both of these
and
which is a little strange since I would expect the latter to only be necessary if the former is missing. I noticed only changing the "Feature" to 0 (default disabled) still results in the .cpp being compiled |
4514de3
to
a2b8bb0
Compare
Re-tested on hardware functional. |
Feature only affects custom build server. |
Okay, should I change one of these back to 1? Or does this look good to go? |
Looks good to me |
Merged, thanks! |
Adds a driver for the ST IIS2MDC magnetometer
https://www.st.com/resource/en/datasheet/iis2mdc.pdf