mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
microRTPS: use FastRTPS version instead of FastRTPSGen version to generate conditional code
This commit is contained in:
@@ -68,7 +68,7 @@ except AttributeError:
|
||||
#include <fastrtps/fastrtps_fwd.h>
|
||||
#include <fastrtps/subscriber/SubscriberListener.h>
|
||||
#include <fastrtps/subscriber/SampleInfo.h>
|
||||
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
|
||||
@[if fastrtps_version <= 1.7]@
|
||||
#include "@(topic)_PubSubTypes.h"
|
||||
@[else]@
|
||||
#include "@(topic)PubSubTypes.h"
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
bool init(uint8_t topic_ID, std::condition_variable* t_send_queue_cv, std::mutex* t_send_queue_mutex, std::queue<uint8_t>* t_send_queue);
|
||||
void run();
|
||||
bool hasMsg();
|
||||
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
|
||||
@[if fastrtps_version <= 1.7]@
|
||||
@[ if ros2_distro]@
|
||||
@(package)::msg::dds_::@(topic)_ getMsg();
|
||||
@[ else]@
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
SampleInfo_t m_info;
|
||||
int n_matched;
|
||||
int n_msg;
|
||||
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
|
||||
@[if fastrtps_version <= 1.7]@
|
||||
@[ if ros2_distro]@
|
||||
@(package)::msg::dds_::@(topic)_ msg;
|
||||
@[ else]@
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
std::mutex has_msg_mutex;
|
||||
|
||||
} m_listener;
|
||||
@[if 1.5 <= fastrtpsgen_version <= 1.7]@
|
||||
@[if fastrtps_version <= 1.7]@
|
||||
@[ if ros2_distro]@
|
||||
@(package)::msg::dds_::@(topic)_PubSubType @(topic)DataType;
|
||||
@[ else]@
|
||||
|
||||
Reference in New Issue
Block a user