Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Adis16448 refactor #11224

wants to merge 1 commit into from

Conversation

mcsauder
Copy link
Contributor

@mcsauder mcsauder commented Jan 16, 2019

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!

@mcsauder mcsauder force-pushed the adis16448Refactor branch 2 times, most recently from c1f7a6f to 41bfa93 Compare January 18, 2019 23:15
@mcsauder mcsauder force-pushed the adis16448Refactor branch 17 times, most recently from 5a52fb6 to 6561f24 Compare January 26, 2019 18:47
@mcsauder mcsauder mentioned this pull request Jan 28, 2019
@mcsauder mcsauder force-pushed the adis16448Refactor branch 5 times, most recently from b2c30ba to 7355373 Compare February 4, 2019 04:03
@dagar
Copy link
Member

dagar commented Feb 5, 2019

I can test this soon.

@mcsauder mcsauder force-pushed the adis16448Refactor branch from 6c0e8d1 to ded3dd4 Compare March 18, 2019 18:11
@mcsauder mcsauder force-pushed the adis16448Refactor branch 5 times, most recently from 6347a89 to dc99cf6 Compare April 4, 2019 15:58
@mcsauder mcsauder force-pushed the adis16448Refactor branch 3 times, most recently from 874f879 to 0c24534 Compare April 11, 2019 16:32
@mcsauder
Copy link
Contributor Author

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.

@mcsauder mcsauder force-pushed the adis16448Refactor branch 4 times, most recently from 5ca5b29 to ef15994 Compare April 18, 2019 15:21
@mcsauder mcsauder force-pushed the adis16448Refactor branch 3 times, most recently from b8d2f48 to 1030785 Compare April 24, 2019 16:19
@mcsauder mcsauder force-pushed the adis16448Refactor branch from 1030785 to a2f6fc7 Compare April 30, 2019 15:46
@mcsauder mcsauder force-pushed the adis16448Refactor branch 2 times, most recently from 0f8c7ca to dc6f33e Compare May 10, 2019 03:29
@mcsauder mcsauder force-pushed the adis16448Refactor branch from dc6f33e to 364f066 Compare May 14, 2019 14:46
@mcsauder mcsauder force-pushed the adis16448Refactor branch from 364f066 to fe7d99e Compare May 19, 2019 21:52
…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.
@mcsauder mcsauder force-pushed the adis16448Refactor branch from fe7d99e to 0425df1 Compare May 24, 2019 16:53
@mcsauder
Copy link
Contributor Author

Closing in favor of #12066!

@mcsauder mcsauder closed this May 24, 2019
@mcsauder mcsauder deleted the adis16448Refactor branch July 11, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants