-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Adis16448 refactor #11224
Adis16448 refactor #11224
Conversation
c1f7a6f
to
41bfa93
Compare
5a52fb6
to
6561f24
Compare
6561f24
to
87054b0
Compare
b2c30ba
to
7355373
Compare
7355373
to
46e0a86
Compare
I can test this soon. |
6c0e8d1
to
ded3dd4
Compare
6347a89
to
dc99cf6
Compare
874f879
to
0c24534
Compare
This PR, and #11629 are steps in the direction of #9279. I don't think that the drivers will all get cleaned up in one pass, so I think it's important to keep chipping away until they all have the same basic components, standardized naming, standardized method ordering, methods that do the same thing have the same lines of code, etc. Once the drivers are aligned, it will be very straightforward to implement inheritance structures and architectural modifications. |
5ca5b29
to
ef15994
Compare
b8d2f48
to
1030785
Compare
1030785
to
a2f6fc7
Compare
0f8c7ca
to
dc6f33e
Compare
dc6f33e
to
364f066
Compare
364f066
to
fe7d99e
Compare
…d eliminate goto statements. Rename adis16448.cpp/h to ADIS16448.cpp/h. Added ADIS16448_accel.cpp/h, ADIS16448_gyro.cpp/h, ADIS16448_mag.cpp/h, and added ADIS16448_accel class to standardize inheriting classes.
fe7d99e
to
0425df1
Compare
Closing in favor of #12066! |
Hi,
This PR is the start of a larger effort to unify/standardize IMU driver implementations. Once all of the IMU drivers are structured/organized it becomes much more straightforward to modify the overall driver structure. This should help reduce the need for much of the copy/paste during new driver creation.
NOTE: This PR requires hardware validation. (The adis16448 driver is the first in this work because it is first in the imu directory.)
Describe problem solved by the proposed pull request
The IMU driver implementations all share a basic level of required functionality. Many implementations have been copy/pasted/modified but many use different file structures, use different names for methods that perform the same or similar operations, or have other small variations that can be standardized.
If the basic structure of all of the existing IMU drivers is standardized there should be opportunity to better architect driver inheritance architectures.
Describe your preferred solution
This PR breaks out accel/gyro/mag classes into their own files and establishes a basic file structure/class structure that can be replicated in each of the other IMU driver classes.
Describe possible alternatives
The driver functions as-is, so it is entirely acceptable to keep the status-quo. (Please let me know if that is preferred.)
Thanks for your review!