mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
add support to FastRTPS 2.0.0 (Fast-DDS)
This commit is contained in:
@@ -90,7 +90,11 @@ bool @(topic)_Publisher::init()
|
|||||||
{
|
{
|
||||||
// Create RTPSParticipant
|
// Create RTPSParticipant
|
||||||
ParticipantAttributes PParam;
|
ParticipantAttributes PParam;
|
||||||
|
@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@
|
||||||
PParam.rtps.builtin.domainId = 0;
|
PParam.rtps.builtin.domainId = 0;
|
||||||
|
@[else]@
|
||||||
|
PParam.domainId = 0;
|
||||||
|
@[end if]@
|
||||||
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
|
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
|
||||||
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
|
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
|
||||||
@[else]@
|
@[else]@
|
||||||
|
|||||||
@@ -90,7 +90,11 @@ bool @(topic)_Subscriber::init(uint8_t topic_ID, std::condition_variable* t_send
|
|||||||
|
|
||||||
// Create RTPSParticipant
|
// Create RTPSParticipant
|
||||||
ParticipantAttributes PParam;
|
ParticipantAttributes PParam;
|
||||||
PParam.rtps.builtin.domainId = 0; // MUST BE THE SAME AS IN THE PUBLISHER
|
@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@
|
||||||
|
PParam.rtps.builtin.domainId = 0;
|
||||||
|
@[else]@
|
||||||
|
PParam.domainId = 0;
|
||||||
|
@[end if]@
|
||||||
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
|
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
|
||||||
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
|
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
|
||||||
@[else]@
|
@[else]@
|
||||||
|
|||||||
Reference in New Issue
Block a user