Skip to content

Commit 23783e4

Browse files
committed
(fix) uncrustify
1 parent 6b0a771 commit 23783e4

File tree

10 files changed

+182
-189
lines changed

10 files changed

+182
-189
lines changed

rclcpp_lifecycle/CMakeLists.txt

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,24 @@ foreach(rmw_implementation ${rmw_implementations2})
2222
endforeach()
2323

2424
set(lifecycle_msg_files
25-
"msg/Transition.msg"
26-
)
25+
"msg/Transition.msg")
2726
set(lifecycle_srv_files
2827
"srv/GetState.srv"
29-
"srv/ChangeState.srv"
30-
)
28+
"srv/ChangeState.srv")
3129
rosidl_generate_interfaces(lifecycle_msgs
3230
${lifecycle_msg_files}
33-
${lifecycle_srv_files}
34-
)
31+
${lifecycle_srv_files})
3532

3633
include_directories(
37-
include
38-
)
34+
include)
3935

4036
set(rcl_lifecycle_sources
4137
src/rcl_lifecycle/default_state_machine.c
4238
src/rcl_lifecycle/rcl_lifecycle.c
43-
src/rcl_lifecycle/transition_map.c
44-
)
39+
src/rcl_lifecycle/transition_map.c)
4540
set_source_files_properties(
4641
${rcl_lifecycle_sources}
47-
PROPERTIES language "C"
48-
)
42+
PROPERTIES language "C")
4943

5044
macro(targets)
5145
get_rclcpp_information("${rmw_implementation}" "rclcpp${target_suffix}")
@@ -62,8 +56,7 @@ macro(targets)
6256
foreach(typesupport_impl ${typesupport_impls_c})
6357
rosidl_target_interfaces(rcl_lifecycle${target_suffix}
6458
lifecycle_msgs
65-
${typesupport_impl}
66-
)
59+
${typesupport_impl})
6760
endforeach()
6861

6962
ament_target_dependencies(rcl_lifecycle${target_suffix}
@@ -73,8 +66,7 @@ macro(targets)
7366
install(TARGETS rcl_lifecycle${target_suffix}
7467
ARCHIVE DESTINATION lib
7568
LIBRARY DESTINATION lib
76-
RUNTIME DESTINATION bin
77-
)
69+
RUNTIME DESTINATION bin)
7870

7971
### CPP High level library+exe
8072
add_library(rclcpp_lifecycle${target_suffix}
@@ -85,8 +77,7 @@ macro(targets)
8577
foreach(typesupport_impl ${typesupport_impls_cpp})
8678
rosidl_target_interfaces(rclcpp_lifecycle${target_suffix}
8779
lifecycle_msgs
88-
${typesupport_impl}
89-
)
80+
${typesupport_impl})
9081
endforeach()
9182
ament_target_dependencies(rclcpp_lifecycle${target_suffix}
9283
"rclcpp${target_suffix}")
@@ -104,8 +95,7 @@ macro(targets)
10495
lifecycle_talker${target_suffix}
10596
ARCHIVE DESTINATION lib
10697
LIBRARY DESTINATION lib
107-
RUNTIME DESTINATION bin
108-
)
98+
RUNTIME DESTINATION bin)
10999
endmacro()
110100

111101
call_for_each_rmw_implementation(targets GENERATE_DEFAULT)

rclcpp_lifecycle/include/rcl_lifecycle/data_types.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2016 Open Source Robotics Foundation, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#ifndef RCL_LIFECYCLE__DATA_TYPES_H_
216
#define RCL_LIFECYCLE__DATA_TYPES_H_
317

rclcpp_lifecycle/include/rcl_lifecycle/rcl_lifecycle.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ rcl_get_zero_initialized_state_machine();
3838

3939
LIFECYCLE_EXPORT
4040
rcl_ret_t
41-
rcl_state_machine_init(rcl_state_machine_t* state_machine, const char* node_name, bool default_states);
41+
rcl_state_machine_init(rcl_state_machine_t * state_machine,
42+
const char * node_name, bool default_states);
4243

4344
LIFECYCLE_EXPORT
4445
rcl_ret_t
45-
rcl_state_machine_fini(rcl_state_machine_t* state_machine);
46+
rcl_state_machine_fini(rcl_state_machine_t * state_machine);
4647

4748
// function definitions
4849
/*

rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_manager.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ class LifecycleManager : public LifecycleManagerInterface
7676
std::shared_ptr<rclcpp::node::Node>
7777
get_node_base_interface()
7878
{
79-
if (node_base_handle_ == nullptr)
80-
{
79+
if (node_base_handle_ == nullptr) {
8180
fprintf(stderr, "Warning: Node base handle in licycle manager is null\n");
8281
}
8382
return node_base_handle_;

rclcpp_lifecycle/src/rcl_lifecycle/default_state_machine.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
#include "rcl_lifecycle/states.h"
2424
#include "rcl_lifecycle/transition_map.h"
2525

26-
#include "default_state_machine.h"
26+
#include "default_state_machine.hxx"
2727

2828
#if __cplusplus
2929
extern "C"
3030
{
3131
#endif
3232

33+
// *INDENT-OFF*
3334
const rcl_state_t rcl_state_unknown = {"unknown", 0};
3435
const rcl_state_t rcl_state_unconfigured = {"unconfigured", 1};
3536
const rcl_state_t rcl_state_inactive = {"inactive", 2};
@@ -42,7 +43,7 @@ const rcl_state_t rcl_state_shuttingdown = {"shuttingdown", 12};
4243
const rcl_state_t rcl_state_activating = {"activating", 13};
4344
const rcl_state_t rcl_state_deactivating = {"deactivating", 14};
4445
const rcl_state_t rcl_state_errorprocessing = {"errorprocessing", 15};
45-
46+
// *INDENT-ON*
4647

4748
rcl_state_t
4849
rcl_create_state(unsigned int index, char * label)
@@ -55,14 +56,14 @@ rcl_state_transition_t
5556
rcl_create_state_transition(unsigned int index, const char * label)
5657
{
5758
rcl_state_transition_t ret_transition = {{.index = index, .label = label},
58-
NULL, NULL, NULL, &rcl_state_errorprocessing};
59+
NULL, NULL, NULL, &rcl_state_errorprocessing};
5960
return ret_transition;
6061
}
6162

6263
// default implementation as despicted on
6364
// design.ros2.org
6465
rcl_ret_t
65-
rcl_init_default_state_machine(rcl_state_machine_t* state_machine)
66+
rcl_init_default_state_machine(rcl_state_machine_t * state_machine)
6667
{
6768
// Maybe we can directly store only pointers to states
6869
rcl_register_primary_state(&state_machine->transition_map, rcl_state_unconfigured);
@@ -98,7 +99,7 @@ rcl_init_default_state_machine(rcl_state_machine_t* state_machine)
9899
&rcl_state_active, &rcl_state_finalized, rcl_transition_shuttingdown);
99100

100101
// set to first entry
101-
//state_machine->current_state = &state_machine->transition_map.primary_states[0];
102+
// state_machine->current_state = &state_machine->transition_map.primary_states[0];
102103
state_machine->current_state = &rcl_state_unconfigured;
103104
return RCL_RET_OK;
104105
}

rclcpp_lifecycle/src/rcl_lifecycle/default_state_machine.h renamed to rclcpp_lifecycle/src/rcl_lifecycle/default_state_machine.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef RCL_LIFECYCLE__DEFAULT_STATE_MACHINE_H_
16-
#define RCL_LIFECYCLE__DEFAULT_STATE_MACHINE_H_
15+
#ifndef RCL_LIFECYCLE__DEFAULT_STATE_MACHINE_HXX_
16+
#define RCL_LIFECYCLE__DEFAULT_STATE_MACHINE_HXX_
1717

1818
#include <rcl/types.h>
1919

@@ -27,10 +27,10 @@ extern "C"
2727

2828
LIFECYCLE_EXPORT
2929
rcl_ret_t
30-
rcl_init_default_state_machine(rcl_state_machine_t* state_machine);
30+
rcl_init_default_state_machine(rcl_state_machine_t * state_machine);
3131

3232
#if __cplusplus
3333
}
3434
#endif
3535

36-
#endif // RCL_LIFECYCLE__DEFAULT_STATE_MACHINE_H_
36+
#endif // RCL_LIFECYCLE__DEFAULT_STATE_MACHINE_HXX_

0 commit comments

Comments
 (0)