Skip to content

Commit 925003c

Browse files
committed
Make the library not dependent on the USE_USBCON define.
1 parent c26ad99 commit 925003c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

rosserial_rp2040/Readme.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ Rosserial client for rp2040 usage
1010
- Execute the command 'rosrun rosserial_rp2040 make_libraries.py' to generate the ros_lib library files in the pico-sdk library folder
1111
- To generate the ros_lib library files in a custom location use 'rosrun rosserial_rp2040 make_libraries.py <custom location>'
1212

13+
To use the rp2040 USB serial connection for ros, use NodeHandleUSB instead of NodeHandle.
14+
1315
The rosserial functionality can now be accessed from the project as described in the rosserial tutorials.
1416

rosserial_rp2040/src/ros_lib/ros.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111

1212
namespace ros
1313
{
14-
#ifdef USE_USBCON
15-
typedef ros::NodeHandle_<RP2040_Hardware_USB> NodeHandle;
16-
#else
14+
typedef ros::NodeHandle_<RP2040_Hardware_USB> NodeHandleUSB;
1715
typedef ros::NodeHandle_<RP2040_Hardware> NodeHandle;
18-
#endif
1916
}
2017

21-
#endif
18+
#endif

0 commit comments

Comments
 (0)