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

examples: Add example using Common structure #51

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RaulTrombin
Copy link
Member

image

Actually it's using the common::Device as Common,
Suggest to import common::Device as Generic on devices.rs ( same we do for Ping1D and Ping360).

So we fast can implement:
undefined = Generic::new()

which will handle an .upgrade() to a newer strucutre based on .get_device_info, if the structure is available <(ping1,pin360,omni), error>.

Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

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

I don't follow, why not having just a common device creation in the ping1d example ? And move it to just an abstract device creation example.
This and the ping1d example, shares 90% of the code.

@RaulTrombin RaulTrombin marked this pull request as draft July 29, 2024 12:59
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