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

RPM: Send on Periph and receive on vehicle #26508

Merged
merged 6 commits into from
May 2, 2024

Conversation

IamPete1
Copy link
Member

This adds support for a new DroneCAN rpm message, dronecan/DSDL#53

It is sent on periph by setting a message rate with RPM_MSG_RATE and alocating a sensor ID with RPMx_DC_SEND_ID. Set HAL_PERIPH_ENABLE_RPM_STREAM to enable in the build.

On the vehicle side set RPMx_TYPE to 7 and RPMx_DC_ID to match the send ID you want to receive.

Its a bit upsetting having two params for this in RPM, really we need per-instance params so you would only see the RPMx_DC_ID on the DroneCAN backend.

This updates the DroneCAN DSDL to point at my branch, we will need to do the shuffle to merge the DSDL PR first.

@IamPete1
Copy link
Member Author

Looking for approval of approach so we can merge the DSDL change.

@IamPete1
Copy link
Member Author

IamPete1 commented May 1, 2024

Tested with SITL Universal periph. Periph using SITL RPM backed with sensor ID 5. Receiving on vehicle with DroneCAN backend with the same senor ID. Tested health reporting by changing the min quality param on periph such that its sensor goes unhealthy. The local sensor correctly follows this.

00000005.zip

tridge
tridge previously requested changes May 1, 2024
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

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

just the int16, can be merged after that, ping on code_review
thanks!

Tools/AP_Periph/Parameters.h Outdated Show resolved Hide resolved
@tridge tridge removed the DevCallEU label May 1, 2024
@IamPete1 IamPete1 dismissed tridge’s stale review May 1, 2024 16:12

Param updated to AP_int16

@IamPete1 IamPete1 requested a review from tridge May 1, 2024 16:12
@tridge tridge merged commit 410521a into ArduPilot:master May 2, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants