Skip to content

Conversation

RaulTrombin
Copy link
Member

@RaulTrombin RaulTrombin commented May 31, 2024

image

Currently 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
Copy link
Member Author

RaulTrombin commented Nov 22, 2024

@patrickelectric @joaoantoniocardoso updated this to test new self-hosted CIs, it works.

ping_common
Parsing user provided values and creating port...
Using UDP address: 192.168.1.197
Creating your Ping device
Received a message from device with id 2
Received a message from device with id 2
Protocol version is: 1.1.0
Device information: 
 DeviceInformationStruct { device_type: 2, device_revision: 67, firmware_version_major: 3, firmware_version_minor: 3, firmware_version_patch: 5, reserved: 0 }
Checking if subscriber returns with 2 same packages...
Received 2 protocol messages

@RaulTrombin RaulTrombin marked this pull request as ready for review November 24, 2024 16:18
@patrickelectric patrickelectric merged commit 682b575 into bluerobotics:master Nov 25, 2024
5 checks passed
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