From c26ad99a2551fedf04e96a1aa3665d5fbb7437fd Mon Sep 17 00:00:00 2001 From: Paul Tervoort Date: Tue, 17 Jan 2023 20:49:06 +0100 Subject: [PATCH] Revert "Allowed for the ros library to be included in multiple headers." This reverts commit ab7e4fb2984a3c5f4d109199d053044b3201d3d1. --- rosserial_rp2040/src/ros_lib/RP2040_Hardware_USB.h | 4 ++-- rosserial_rp2040/src/ros_lib/ros.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rosserial_rp2040/src/ros_lib/RP2040_Hardware_USB.h b/rosserial_rp2040/src/ros_lib/RP2040_Hardware_USB.h index 4b9059856..35ef8d0b3 100644 --- a/rosserial_rp2040/src/ros_lib/RP2040_Hardware_USB.h +++ b/rosserial_rp2040/src/ros_lib/RP2040_Hardware_USB.h @@ -39,10 +39,10 @@ #ifndef ROS_RP2040_Hardware_USB_H_ #define ROS_RP2040_Hardware_USB_H_ -class RP2040_Hardware +class RP2040_Hardware_USB { public: - RP2040_Hardware() {} + RP2040_Hardware_USB() {} // any initialization code necessary to use the serial port void init() diff --git a/rosserial_rp2040/src/ros_lib/ros.h b/rosserial_rp2040/src/ros_lib/ros.h index 865e13e28..c5a21b164 100644 --- a/rosserial_rp2040/src/ros_lib/ros.h +++ b/rosserial_rp2040/src/ros_lib/ros.h @@ -6,16 +6,16 @@ #define _ROS_H_ #include "ros/node_handle.h" - -#ifdef USE_USBCON #include "RP2040_Hardware.h" -#else #include "RP2040_Hardware_USB.h" -#endif namespace ros { + #ifdef USE_USBCON + typedef ros::NodeHandle_ NodeHandle; + #else typedef ros::NodeHandle_ NodeHandle; + #endif } -#endif +#endif \ No newline at end of file