From 925003ccff6e8d4984c5c6c05536d97817d2124e Mon Sep 17 00:00:00 2001 From: Paul Tervoort Date: Tue, 17 Jan 2023 20:51:37 +0100 Subject: [PATCH] Make the library not dependent on the USE_USBCON define. --- rosserial_rp2040/Readme.txt | 2 ++ rosserial_rp2040/src/ros_lib/ros.h | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rosserial_rp2040/Readme.txt b/rosserial_rp2040/Readme.txt index 0ce27f673..e0a1fbaf3 100644 --- a/rosserial_rp2040/Readme.txt +++ b/rosserial_rp2040/Readme.txt @@ -10,5 +10,7 @@ Rosserial client for rp2040 usage - Execute the command 'rosrun rosserial_rp2040 make_libraries.py' to generate the ros_lib library files in the pico-sdk library folder - To generate the ros_lib library files in a custom location use 'rosrun rosserial_rp2040 make_libraries.py ' +To use the rp2040 USB serial connection for ros, use NodeHandleUSB instead of NodeHandle. + The rosserial functionality can now be accessed from the project as described in the rosserial tutorials. diff --git a/rosserial_rp2040/src/ros_lib/ros.h b/rosserial_rp2040/src/ros_lib/ros.h index c5a21b164..06bde70bd 100644 --- a/rosserial_rp2040/src/ros_lib/ros.h +++ b/rosserial_rp2040/src/ros_lib/ros.h @@ -11,11 +11,8 @@ namespace ros { - #ifdef USE_USBCON - typedef ros::NodeHandle_ NodeHandle; - #else + typedef ros::NodeHandle_ NodeHandleUSB; typedef ros::NodeHandle_ NodeHandle; - #endif } -#endif \ No newline at end of file +#endif