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

Refactor ulanding driver to utilize ScheduledWorkQueue class inheritance #11894

Merged
merged 2 commits into from Jul 28, 2019

Conversation

mcsauder
Copy link
Contributor

@mcsauder mcsauder commented Apr 23, 2019

Describe problem solved by the proposed pull request
This PR refactors the ulanding driver to inherit from the ScheduleWorkQueue class and simplify the collect() method logic to mirror logic in the cm8jl65 driver and the example code provided by Aerotenna (uLanding manufacturer).

Describe your preferred solution
Standardizing all of the distance sensor driver variable initialization, method ordering and general style will allow for future inheritance structure work to be performed on the distance sensor driver classes, see #11977.

Describe possible alternatives
The driver could be left as-is, it is functional in PX4:master.

Additional context
See #9279, #11853, #11857, #1858, #11859, #11891, #11892, #11893, #11977

Please let me know if you have any questions on this PR. Thanks!

-Mark

@mcsauder
Copy link
Contributor Author

@RomanBapst , would you be willing to review this PR for me? I'm trying to align the distance sensor drivers (slowly) so than an inheritance hierarchy can be created and code duplication reduced. Thank you in advance!

@RomanBapst RomanBapst self-requested a review April 30, 2019 20:15
RomanBapst
RomanBapst previously approved these changes May 5, 2019
Copy link
Contributor

@RomanBapst RomanBapst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcsauder Looks good as far as I can tell. It would be good if somebody could test it.

@mcsauder
Copy link
Contributor Author

mcsauder commented May 5, 2019

Thanks @RomanBapst for looking this over. I'll ask during the dev call this week to see if I can find anyone with hardware that can test it. I appreciate your time looking it over, thanks again!

@bys1123
Copy link
Contributor

bys1123 commented May 5, 2019

I'll tell ulanding them about this change, see if they have time test on is.

@mcsauder
Copy link
Contributor Author

I finished a larger refactoring of this driver to utilize the ScheduledWorkQueue and have added that commit to this PR.

Here is a screen shot of bench testing with QGC Analyze with PX4:master:
image

Here is a screen shot of this PR:
image

@mcsauder mcsauder changed the title Migrate ulanding driver class member variable initialization to declarations, format whitespace and alphabetize/group/order var/method declarations Refactor ulanding driver to utilze ScheduledWorkQueue class inheritance Jul 10, 2019
@mcsauder mcsauder changed the title Refactor ulanding driver to utilze ScheduledWorkQueue class inheritance Refactor ulanding driver to utilize ScheduledWorkQueue class inheritance Jul 10, 2019
…uniform initialization, format whitespace, alphabetize/group/order variables and methods in ulanding.cpp.
@dagar dagar merged commit f432f74 into PX4:master Jul 28, 2019
@mcsauder mcsauder deleted the ulanding_driver_work branch July 30, 2019 05:21
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.

None yet

4 participants