Skip to content

Commit

Permalink
Make the library not dependent on the USE_USBCON define.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulTervoort committed Jan 17, 2023
1 parent c26ad99 commit 925003c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions rosserial_rp2040/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <custom location>'

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.

7 changes: 2 additions & 5 deletions rosserial_rp2040/src/ros_lib/ros.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@

namespace ros
{
#ifdef USE_USBCON
typedef ros::NodeHandle_<RP2040_Hardware_USB> NodeHandle;
#else
typedef ros::NodeHandle_<RP2040_Hardware_USB> NodeHandleUSB;
typedef ros::NodeHandle_<RP2040_Hardware> NodeHandle;
#endif
}

#endif
#endif

0 comments on commit 925003c

Please sign in to comment.