mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 01:03:33 +08:00
microRTPS: use package.version to compare FastRTPS lib versions
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
@# - ids (List) list of all RTPS msg ids
|
||||
@###############################################
|
||||
@{
|
||||
from packaging import version
|
||||
import genmsg.msgs
|
||||
|
||||
from px_generate_uorb_topic_helper import * # this is in Tools/
|
||||
@@ -90,7 +91,7 @@ bool @(topic)_Subscriber::init(uint8_t topic_ID, std::condition_variable* t_send
|
||||
// Create RTPSParticipant
|
||||
ParticipantAttributes PParam;
|
||||
PParam.rtps.builtin.domainId = 0; // MUST BE THE SAME AS IN THE PUBLISHER
|
||||
@[if fastrtps_version <= 1.8]@
|
||||
@[if version.parse(fastrtps_version) <= 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