Skip to content

Commit 4418179

Browse files
stmoonTSC21
authored andcommitted
fix the fastrtps version problem in case of v1.10.0
1 parent d0c7471 commit 4418179

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

msg/templates/urtps/Publisher.cpp.em

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ bool @(topic)_Publisher::init()
9090
{
9191
// Create RTPSParticipant
9292
ParticipantAttributes PParam;
93-
@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@
93+
@[if version.parse(fastrtps_version) < version.parse('2.0')]@
9494
PParam.rtps.builtin.domainId = 0;
9595
@[else]@
9696
PParam.domainId = 0;
9797
@[end if]@
98-
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
98+
@[if version.parse(fastrtps_version) <= version.parse('1.8')]@
9999
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
100100
@[else]@
101101
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;

msg/templates/urtps/Subscriber.cpp.em

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ bool @(topic)_Subscriber::init(uint8_t topic_ID, std::condition_variable* t_send
9090

9191
// Create RTPSParticipant
9292
ParticipantAttributes PParam;
93-
@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@
93+
@[if version.parse(fastrtps_version) < version.parse('2.0')]@
9494
PParam.rtps.builtin.domainId = 0;
9595
@[else]@
9696
PParam.domainId = 0;
9797
@[end if]@
98-
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
98+
@[if version.parse(fastrtps_version) <= version.parse('1.8')]@
9999
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
100100
@[else]@
101101
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;

0 commit comments

Comments
 (0)