File tree Expand file tree Collapse file tree
int32_publisher_custom_transport_usbcdc/main
int32_publisher_custom_transport/main
int32_publisher_embeddedrtps/main Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ add_dependencies(libmicroros-prebuilt libmicroros_project)
9797
9898set_target_properties (libmicroros-prebuilt PROPERTIES IMPORTED_LOCATION ${COMPONENT_DIR} /libmicroros.a )
9999target_include_directories (libmicroros-prebuilt INTERFACE ${COMPONENT_DIR} /include )
100+ target_compile_definitions (libmicroros-prebuilt INTERFACE RCL_MICROROS )
100101
101102file (GLOB include_folders LIST_DIRECTORIES true CONFIGURE_DEPENDS ${COMPONENT_DIR} /include/* )
102103foreach (include_folder ${include_folders} )
@@ -106,6 +107,7 @@ foreach(include_folder ${include_folders})
106107 endif ()
107108endforeach ()
108109
110+ target_compile_definitions (${COMPONENT_LIB} PUBLIC RCL_MICROROS )
109111add_dependencies (${COMPONENT_LIB} libmicroros-prebuilt )
110112target_link_libraries (${COMPONENT_LIB} INTERFACE libmicroros-prebuilt )
111113
Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ sensor_msgs__msg__Image msg_static;
3232
3333uint8_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 ));
Original file line number Diff line number Diff line change 2424rcl_publisher_t publisher ;
2525std_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 ));
Original file line number Diff line number Diff line change 2424rcl_publisher_t publisher ;
2525std_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 ++ ;
Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ rcl_publisher_t publisher; // Publisher
5151std_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+ }
Original file line number Diff line number Diff line change 2020rcl_publisher_t publisher ;
2121std_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 ));
Original file line number Diff line number Diff line change @@ -26,9 +26,10 @@ rcl_subscription_t subscriber;
2626std_msgs__msg__Int32 send_msg ;
2727std_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+ }
Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ std_msgs__msg__Int32 msg;
3232esp_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
Original file line number Diff line number Diff line change 2323
2424rclc_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+ }
Original file line number Diff line number Diff line change @@ -40,9 +40,10 @@ int device_id;
4040int seq_no ;
4141int 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
You can’t perform that action at this time.
0 commit comments