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

Add in a test for the new get_parameter_or_set_default API. #296

Merged
merged 3 commits into from
Sep 20, 2018

Conversation

clalancette
Copy link
Contributor

@clalancette clalancette commented Sep 6, 2018

This should only be merged if ros2/rclcpp#551 is approved and merged.

connects to ros2/rclcpp#551

@clalancette clalancette added the in progress Actively being worked on (Kanban column) label Sep 6, 2018
@clalancette clalancette added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Sep 6, 2018
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
{
// try to get with default a parameter that is already set
int64_t foo_value = -1;
node->get_parameter_or("foo", foo_value, static_cast<int64_t>(42));
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be a call to get_parameter_or_set_default()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, absolutely, thanks for pointing it out. Cut-n-paste error. It should be fixed now.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

Thanks for the review, merging.

@clalancette clalancette merged commit b25eb3c into master Sep 20, 2018
@clalancette clalancette deleted the get-parameter-or-set-default branch September 20, 2018 13:21
@clalancette clalancette removed the in review Waiting for review (Kanban column) label Sep 20, 2018
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