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

Minor fixes to rcl_action #382

Merged
merged 3 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions rcl_action/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

add_executable(test_compile_headers
src/test_compile_headers.c
)

set(rcl_action_sources
src/${PROJECT_NAME}/action_client.c
src/${PROJECT_NAME}/action_server.c
Expand Down
2 changes: 0 additions & 2 deletions rcl_action/include/rcl_action/action_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ typedef struct rcl_action_server_options_t
/// Custom allocator for the action server, used for incidental allocations.
/** For default behavior (malloc/free), see: rcl_get_default_allocator() */
rcl_allocator_t allocator;
/// Clock type used for checking result timeouts.
rcl_clock_type_t clock_type;
Copy link
Member

Choose a reason for hiding this comment

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

is this a candidate for backporting into Crystal?

No, this breaks ABI (and API).

/// Goal handles that have results longer than this time are deallocated.
rcl_duration_t result_timeout;
} rcl_action_server_options_t;
Expand Down
4 changes: 4 additions & 0 deletions rcl_action/src/rcl_action/goal_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ rcl_action_update_goal_state(
rcl_action_goal_state_t new_state = rcl_action_transition_goal_state(
goal_handle->impl->state, goal_event);
if (GOAL_STATE_UNKNOWN == new_state) {
RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(
"goal_handle attempted invalid transition from state %d with event %d",
goal_handle->impl->state,
goal_event);
return RCL_RET_ACTION_GOAL_EVENT_INVALID;
}
goal_handle->impl->state = new_state;
Expand Down
21 changes: 0 additions & 21 deletions rcl_action/src/test_compile_headers.c

This file was deleted.