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

Fix/service examples #231

Merged
merged 2 commits into from
May 25, 2023

Conversation

rebeccaRossRobotics
Copy link
Contributor

This PR fixes the Service Client example when filling the parameter variable when sending an ExecuteCommand_1_1 by changing it from std::copy_n to std::copy and also back filling with std::back_insertor.

I also added a bit of code to the Service Server example so it prints the contents of the parameter variable on receipt on an ExecuteCommand_1_1 request.

I added some other serial prints so aid in debugging and know which example is running on which device, along with node ids.

service_parameter_working

Picture to show it working on my setup

@github-actions
Copy link

Memory usage change @ 24d4477

Board flash % RAM for global variables %
rp2040:rp2040:arduino_nano_connect 🔺 0 - +672 0.0 - 0.0 🔺 0 - +4 0.0 - 0.0
rp2040:rp2040:rpipico 🔺 0 - +672 0.0 - +0.03 🔺 0 - +4 0.0 - 0.0
Click for full report table
Board examples/OpenCyphal-Blink
flash
% examples/OpenCyphal-Blink
RAM for global variables
% examples/OpenCyphal-Heartbeat-Publisher
flash
% examples/OpenCyphal-Heartbeat-Publisher
RAM for global variables
% examples/OpenCyphal-Heartbeat-Subscriber
flash
% examples/OpenCyphal-Heartbeat-Subscriber
RAM for global variables
% examples/OpenCyphal-Service-Client
flash
% examples/OpenCyphal-Service-Client
RAM for global variables
% examples/OpenCyphal-Service-Server
flash
% examples/OpenCyphal-Service-Server
RAM for global variables
%
rp2040:rp2040:arduino_nano_connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 304 0.0 4 0.0 672 0.0 0 0.0
rp2040:rp2040:rpipico 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 304 0.01 4 0.0 672 0.03 0 0.0
Click for full report CSV
Board,examples/OpenCyphal-Blink<br>flash,%,examples/OpenCyphal-Blink<br>RAM for global variables,%,examples/OpenCyphal-Heartbeat-Publisher<br>flash,%,examples/OpenCyphal-Heartbeat-Publisher<br>RAM for global variables,%,examples/OpenCyphal-Heartbeat-Subscriber<br>flash,%,examples/OpenCyphal-Heartbeat-Subscriber<br>RAM for global variables,%,examples/OpenCyphal-Service-Client<br>flash,%,examples/OpenCyphal-Service-Client<br>RAM for global variables,%,examples/OpenCyphal-Service-Server<br>flash,%,examples/OpenCyphal-Service-Server<br>RAM for global variables,%
rp2040:rp2040:arduino_nano_connect,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,304,0.0,4,0.0,672,0.0,0,0.0
rp2040:rp2040:rpipico,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,304,0.01,4,0.0,672,0.03,0,0.0

@aentinger aentinger added topic: firmware Code that runs on an embedded system. type: bug type: enhancement PR to improve the project. labels May 25, 2023
@aentinger
Copy link
Member

Hi @rebeccaRossRobotics ☕ 👋

Thank you very much for taking the time and patching this up! Much obliged!

Copy link
Member

@aentinger aentinger left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thank you for the contribution 🙇 🚀

@aentinger aentinger merged commit 1d61b53 into 107-systems:main May 25, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: firmware Code that runs on an embedded system. type: bug type: enhancement PR to improve the project.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants