This repository was archived by the owner on Sep 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 tasks
julionce
reviewed
Jun 8, 2020
Comment on lines
68
to
77
| RCL_CHECK_FOR_NULL_WITH_MSG( | ||
| support, "support is a null pointer", return RCL_RET_INVALID_ARGUMENT); | ||
| RCL_CHECK_FOR_NULL_WITH_MSG( | ||
| init_options, "init_options is a null pointer", return RCL_RET_INVALID_ARGUMENT); | ||
| RCL_CHECK_FOR_NULL_WITH_MSG( | ||
| allocator, "allocator is a null pointer", return RCL_RET_INVALID_ARGUMENT); | ||
| rcl_ret_t rc = RCL_RET_OK; | ||
|
|
||
| memcpy(&support->init_options, init_options, sizeof(rcl_init_options_t)); | ||
|
|
||
| support->context = rcl_get_zero_initialized_context(); | ||
| rc = rcl_init(argc, argv, &support->init_options, &support->context); | ||
| if (rc != RCL_RET_OK) { | ||
| PRINT_RCLC_ERROR(rclc_init, rcl_init); | ||
| return rc; | ||
| } | ||
| support->allocator = allocator; | ||
|
|
||
| rc = rcl_clock_init(RCL_STEADY_TIME, &support->clock, support->allocator); | ||
| if (rc != RCL_RET_OK) { | ||
| PRINT_RCLC_ERROR(rclc_init, rcl_clock_init); | ||
| } | ||
| return rc; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to refactor this function taking a common factor from rclc_support_init?
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
1288de2 to
d5b8153
Compare
julionce
previously approved these changes
Jun 8, 2020
JanStaschulat
previously approved these changes
Jun 8, 2020
d5b8153 to
a75cdfc
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the usage of the UNUSED macro because it has interference with systems that has it already defined.
Before merge:
client_uros_packages.reposfor all platforms to the correct branch in https://github.com/micro-ROS/micro-ros-build