mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
microRTPS: templates: check only the major and minor of FastRTPS to set the 'discovery_config' namespace
This commit is contained in:
@@ -91,7 +91,7 @@ bool @(topic)_Publisher::init()
|
||||
// Create RTPSParticipant
|
||||
ParticipantAttributes PParam;
|
||||
PParam.rtps.builtin.domainId = 0;
|
||||
@[if version.parse(fastrtps_version) <= version.parse('1.8')]@
|
||||
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
|
||||
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
|
||||
@[else]@
|
||||
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;
|
||||
|
||||
Reference in New Issue
Block a user