Skip to content

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

Merged
clalancette merged 3 commits intomasterfrom
get-parameter-or-set-default
Sep 20, 2018
Merged

Add in a test for the new get_parameter_or_set_default API.#296
clalancette merged 3 commits intomasterfrom
get-parameter-or-set-default

Conversation

@clalancette
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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>
@clalancette clalancette force-pushed the get-parameter-or-set-default branch from 9d44bf4 to 4f19390 Compare September 13, 2018 14:56
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Copy Markdown
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.

2 participants