Skip to content

Commit 25a0b0b

Browse files
committed
Fix rolling builds
1 parent 2f73852 commit 25a0b0b

11 files changed

Lines changed: 37 additions & 18 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ add_dependencies(libmicroros-prebuilt libmicroros_project)
9797

9898
set_target_properties(libmicroros-prebuilt PROPERTIES IMPORTED_LOCATION ${COMPONENT_DIR}/libmicroros.a)
9999
target_include_directories(libmicroros-prebuilt INTERFACE ${COMPONENT_DIR}/include)
100+
target_compile_definitions(libmicroros-prebuilt INTERFACE RCL_MICROROS)
100101

101102
file(GLOB include_folders LIST_DIRECTORIES true CONFIGURE_DEPENDS ${COMPONENT_DIR}/include/*)
102103
foreach(include_folder ${include_folders})
@@ -106,6 +107,7 @@ foreach(include_folder ${include_folders})
106107
endif()
107108
endforeach()
108109

110+
target_compile_definitions(${COMPONENT_LIB} PUBLIC RCL_MICROROS)
109111
add_dependencies(${COMPONENT_LIB} libmicroros-prebuilt)
110112
target_link_libraries(${COMPONENT_LIB} INTERFACE libmicroros-prebuilt)
111113

examples/handle_static_types/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ sensor_msgs__msg__Image msg_static;
3232

3333
uint8_t my_buffer[1000];
3434

35-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
35+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
3636
{
3737
RCLC_UNUSED(last_call_time);
38+
RCLC_UNUSED(arg);
3839
if (timer != NULL) {
3940
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
4041
RCSOFTCHECK(rcl_publish(&publisher, &msg_static, NULL));

examples/int32_publisher/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
rcl_publisher_t publisher;
2525
std_msgs__msg__Int32 msg;
2626

27-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
27+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2828
{
2929
RCLC_UNUSED(last_call_time);
30+
RCLC_UNUSED(arg);
3031
if (timer != NULL) {
3132
printf("Publishing: %d\n", (int) msg.data);
3233
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));

examples/int32_publisher_custom_transport/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
rcl_publisher_t publisher;
2525
std_msgs__msg__Int32 msg;
2626

27-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
27+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2828
{
2929
RCLC_UNUSED(last_call_time);
30+
RCLC_UNUSED(arg);
3031
if (timer != NULL) {
3132
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
3233
msg.data++;

examples/int32_publisher_custom_transport_usbcdc/main/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ rcl_publisher_t publisher; // Publisher
5151
std_msgs__msg__Int32 msg; // Message to be published
5252

5353
// Timer callback. Publishes a message
54-
void timer_callback(rcl_timer_t *timer, int64_t last_call_time) {
54+
void timer_callback(rcl_timer_t *timer, int64_t last_call_time, uintptr_t arg) {
5555
RCLC_UNUSED(last_call_time);
56+
RCLC_UNUSED(arg);
5657
if (timer != NULL) {
5758
// Publish message to topic
5859
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
@@ -163,4 +164,4 @@ void app_main(void) {
163164
if (task_handle != NULL) {
164165
ESP_LOGI(TAG_MAIN, "micro-ROS task created");
165166
}
166-
}
167+
}

examples/int32_publisher_embeddedrtps/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
rcl_publisher_t publisher;
2121
std_msgs__msg__Int32 msg;
2222

23-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
23+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2424
{
2525
RCLC_UNUSED(last_call_time);
26+
RCLC_UNUSED(arg);
2627
if (timer != NULL) {
2728
printf("Publishing: %d\n", (int) msg.data);
2829
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));

examples/int32_sub_pub/main/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ rcl_subscription_t subscriber;
2626
std_msgs__msg__Int32 send_msg;
2727
std_msgs__msg__Int32 recv_msg;
2828

29-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
29+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
3030
{
3131
(void) last_call_time;
32+
(void) arg;
3233
if (timer != NULL) {
3334
RCSOFTCHECK(rcl_publish(&publisher, &send_msg, NULL));
3435
printf("Sent: %d\n", (int) send_msg.data);
@@ -127,4 +128,4 @@ void app_main(void)
127128
NULL,
128129
CONFIG_MICRO_ROS_APP_TASK_PRIO,
129130
NULL);
130-
}
131+
}

examples/low_consumption/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ std_msgs__msg__Int32 msg;
3232
esp_pm_lock_handle_t pmlock;
3333
#endif /* CONFIG_PM_ENABLE */
3434

35-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
35+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
3636
{
3737
RCLC_UNUSED(last_call_time);
38+
RCLC_UNUSED(arg);
3839
if (timer != NULL) {
3940
#ifdef CONFIG_PM_ENABLE
4041
esp_pm_lock_acquire(pmlock); // disable wifi sleep mode

examples/parameters/main/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323

2424
rclc_parameter_server_t param_server;
2525

26-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
26+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2727
{
2828
(void) timer;
2929
(void) last_call_time;
30+
(void) arg;
3031

3132
int64_t value;
3233
rclc_parameter_get_int(&param_server, "param2", &value);
@@ -142,4 +143,4 @@ void app_main(void)
142143
NULL,
143144
CONFIG_MICRO_ROS_APP_TASK_PRIO,
144145
NULL);
145-
}
146+
}

examples/ping_pong/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ int device_id;
4040
int seq_no;
4141
int pong_count;
4242

43-
void ping_timer_callback(rcl_timer_t * timer, int64_t last_call_time)
43+
void ping_timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
4444
{
4545
RCLC_UNUSED(last_call_time);
46+
RCLC_UNUSED(arg);
4647

4748
if (timer != NULL) {
4849

0 commit comments

Comments
 (0)