Skip to content

Commit 8d92335

Browse files
committed
Uncrustify
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
1 parent c855085 commit 8d92335

4 files changed

Lines changed: 29 additions & 13 deletions

File tree

rmw_microxrcedds_c/src/rmw_microros_internal/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ typedef struct rmw_uxrce_topic_t
122122
struct rmw_uxrce_node_t * owner_node;
123123

124124
union {
125-
const message_type_support_callbacks_t * msg;
126-
const service_type_support_callbacks_t * srv;
125+
const message_type_support_callbacks_t * msg;
126+
const service_type_support_callbacks_t * srv;
127127
} type_support_callbacks;
128128

129129
char topic_name[RMW_UXRCE_TOPIC_NAME_MAX_LENGTH];

rmw_microxrcedds_c/src/rmw_publish.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ rmw_publish(
5050
ret = RMW_RET_ERROR;
5151
} else {
5252
rmw_uxrce_publisher_t * custom_publisher = (rmw_uxrce_publisher_t *)publisher->data;
53-
const message_type_support_callbacks_t * functions = custom_publisher->topic.type_support_callbacks.msg;
53+
const message_type_support_callbacks_t * functions =
54+
custom_publisher->topic.type_support_callbacks.msg;
5455
uint32_t topic_length = functions->get_serialized_size(ros_message);
5556

5657
if (custom_publisher->cs_cb_size) {

rmw_microxrcedds_c/src/rmw_publisher.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,31 +100,38 @@ rmw_create_publisher(
100100

101101
// Create topic
102102
custom_publisher->topic.owner_node = custom_publisher->owner_node;
103-
custom_publisher->topic.topic_id = uxr_object_id(custom_node->context->id_topic++, UXR_TOPIC_ID);
103+
custom_publisher->topic.topic_id =
104+
uxr_object_id(custom_node->context->id_topic++, UXR_TOPIC_ID);
104105

105-
const rosidl_message_type_support_t * type_support_xrce = get_message_typesupport_handle(type_support, ROSIDL_TYPESUPPORT_MICROXRCEDDS_C__IDENTIFIER_VALUE);
106+
const rosidl_message_type_support_t * type_support_xrce = get_message_typesupport_handle(
107+
type_support, ROSIDL_TYPESUPPORT_MICROXRCEDDS_C__IDENTIFIER_VALUE);
106108

107109
if (NULL == type_support_xrce) {
108110
RMW_UROS_TRACE_MESSAGE("Undefined type support")
109111
custom_publisher = NULL;
110112
goto fail;
111113
}
112114

113-
custom_publisher->topic.type_support_callbacks.msg = (const message_type_support_callbacks_t *)type_support_xrce->data;
115+
custom_publisher->topic.type_support_callbacks.msg =
116+
(const message_type_support_callbacks_t *)type_support_xrce->data;
114117

115118
if ((strlen(topic_name) + 1 ) > sizeof(custom_publisher->topic.topic_name)) {
116119
RMW_UROS_TRACE_MESSAGE("failed to allocate string")
117120
custom_publisher = NULL;
118121
goto fail;
119122
}
120-
snprintf((char *)custom_publisher->topic.topic_name, sizeof(custom_publisher->topic.topic_name), "%s", topic_name);
123+
snprintf(
124+
(char *)custom_publisher->topic.topic_name, sizeof(custom_publisher->topic.topic_name),
125+
"%s", topic_name);
121126
rmw_publisher->topic_name = custom_publisher->topic.topic_name;
122127

123128
static char full_topic_name[RMW_UXRCE_TOPIC_NAME_MAX_LENGTH];
124129
static char type_name[RMW_UXRCE_TYPE_NAME_MAX_LENGTH];
125130

126131
generate_topic_name(topic_name, full_topic_name, sizeof(full_topic_name));
127-
generate_type_name(custom_publisher->topic.type_support_callbacks.msg, type_name, sizeof(type_name));
132+
generate_type_name(
133+
custom_publisher->topic.type_support_callbacks.msg, type_name,
134+
sizeof(type_name));
128135

129136
uint16_t topic_req = UXR_INVALID_REQUEST_ID;
130137

rmw_microxrcedds_c/src/rmw_subscription.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,31 +91,39 @@ rmw_create_subscription(
9191

9292
// Create topic
9393
custom_subscription->topic.owner_node = custom_subscription->owner_node;
94-
custom_subscription->topic.topic_id = uxr_object_id(custom_node->context->id_topic++, UXR_TOPIC_ID);
94+
custom_subscription->topic.topic_id = uxr_object_id(
95+
custom_node->context->id_topic++,
96+
UXR_TOPIC_ID);
9597

96-
const rosidl_message_type_support_t * type_support_xrce = get_message_typesupport_handle(type_support, ROSIDL_TYPESUPPORT_MICROXRCEDDS_C__IDENTIFIER_VALUE);
98+
const rosidl_message_type_support_t * type_support_xrce = get_message_typesupport_handle(
99+
type_support, ROSIDL_TYPESUPPORT_MICROXRCEDDS_C__IDENTIFIER_VALUE);
97100

98101
if (NULL == type_support_xrce) {
99102
RMW_UROS_TRACE_MESSAGE("Undefined type support")
100103
custom_subscription = NULL;
101104
goto fail;
102105
}
103106

104-
custom_subscription->topic.type_support_callbacks.msg = (const message_type_support_callbacks_t *)type_support_xrce->data;
107+
custom_subscription->topic.type_support_callbacks.msg =
108+
(const message_type_support_callbacks_t *)type_support_xrce->data;
105109

106110
if ((strlen(topic_name) + 1 ) > sizeof(custom_subscription->topic.topic_name)) {
107111
RMW_UROS_TRACE_MESSAGE("failed to allocate string")
108112
custom_subscription = NULL;
109113
goto fail;
110114
}
111-
snprintf((char *)custom_subscription->topic.topic_name, sizeof(custom_subscription->topic.topic_name), "%s", topic_name);
115+
snprintf(
116+
(char *)custom_subscription->topic.topic_name,
117+
sizeof(custom_subscription->topic.topic_name), "%s", topic_name);
112118
rmw_subscription->topic_name = custom_subscription->topic.topic_name;
113119

114120
static char full_topic_name[RMW_UXRCE_TOPIC_NAME_MAX_LENGTH];
115121
static char type_name[RMW_UXRCE_TYPE_NAME_MAX_LENGTH];
116122

117123
generate_topic_name(topic_name, full_topic_name, sizeof(full_topic_name));
118-
generate_type_name(custom_subscription->topic.type_support_callbacks.msg, type_name, sizeof(type_name));
124+
generate_type_name(
125+
custom_subscription->topic.type_support_callbacks.msg, type_name,
126+
sizeof(type_name));
119127

120128
uint16_t topic_req = UXR_INVALID_REQUEST_ID;
121129

0 commit comments

Comments
 (0)