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 the LeddarOne driver to standardize against other distance sensor drivers. #11858

Merged
merged 5 commits into from Jun 29, 2019

Conversation

mcsauder
Copy link
Contributor

@mcsauder mcsauder commented Apr 15, 2019

Describe problem solved by the proposed pull request
This PR refactors the LeddarOne distance sensor driver to better match other distance sensor driver implementations to allow for a future inheritance architecture.

This PR:

  • Creates a measure() method
  • Deprecates the cycle() method.
  • Simplifies error handling logic within the collect() method.
  • Standardizes methods/var naming with other CDev/UART distance sensor drivers.

Test data / coverage
This PR has been bench tested, see comments/plots below. All bench tests show identical behavior to current PX4:master branch.
Flight test data will be posted when available.

Additional context
See #9279, #11853, #11857

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

-Mark

@mcsauder mcsauder force-pushed the leddar_one_work branch 3 times, most recently from 87479ab to 93bcb8e Compare April 23, 2019 15:34
@mcsauder mcsauder force-pushed the leddar_one_work branch 2 times, most recently from 0c90ba8 to c5b7b76 Compare April 30, 2019 15:49
@mcsauder mcsauder force-pushed the leddar_one_work branch 2 times, most recently from c242c9d to 0901c3f Compare May 10, 2019 03:34
@mcsauder mcsauder force-pushed the leddar_one_work branch 2 times, most recently from 34a385d to 710a6e7 Compare May 24, 2019 16:56
@mcsauder mcsauder force-pushed the leddar_one_work branch 2 times, most recently from c867dce to 375c446 Compare May 31, 2019 21:43
@mcsauder mcsauder force-pushed the leddar_one_work branch 2 times, most recently from a4b459c to 2d85d0f Compare June 5, 2019 15:48
@mcsauder mcsauder force-pushed the leddar_one_work branch 3 times, most recently from 64c0af6 to 132bbcd Compare June 18, 2019 17:38
…mploy uniform initialization style. Copy/paste help() and main() methods to the bottom of the file to match convention with other distance sensor drivers.
…thods that were global and to standardize the implementation against most of the other distance sensor drivers.
@mcsauder
Copy link
Contributor Author

Bench tests compare well with PX4:master, no perceptable differences in data:

PX4:master:
image

This PR:
image

… measure() method to untangle the previous logic implementation.
@mcsauder mcsauder changed the title Migrate remaining member variable intialization to declarations, employ uniform initialization styling, and standardize method order within leddar_one.cpp Refactor the LeddarOne driver to standardize against other distance sensor drivers. Jun 28, 2019
@dagar dagar merged commit 5857cf4 into PX4:master Jun 29, 2019
@mcsauder
Copy link
Contributor Author

Thank you for your review @dagar!

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

2 participants