mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 04:47:35 +08:00
microRTPS: add timesync for the agent side
This commit is contained in:
@@ -416,6 +416,8 @@ def generate_agent(out_dir):
|
||||
shutil.rmtree(os.path.join(out_dir, "fastrtpsgen"))
|
||||
cp_wildcard(os.path.join(urtps_templates_dir,
|
||||
"microRTPS_transport.*"), agent_out_dir)
|
||||
cp_wildcard(os.path.join(urtps_templates_dir,
|
||||
"microRTPS_timesync.*"), agent_out_dir)
|
||||
if cmakelists:
|
||||
os.rename(os.path.join(out_dir, "microRTPS_agent_CMakeLists.txt"),
|
||||
os.path.join(out_dir, "CMakeLists.txt"))
|
||||
@@ -457,6 +459,12 @@ def generate_client(out_dir):
|
||||
if os.path.isfile(def_file):
|
||||
os.rename(def_file, def_file.replace(".cpp", ".cpp_"))
|
||||
def_file = os.path.join(default_client_out, "microRTPS_transport.h")
|
||||
if os.path.isfile(def_file):
|
||||
os.rename(def_file, def_file.replace(".cpp", ".cpp_"))
|
||||
def_file = os.path.join(default_client_out, "microRTPS_timesync.cpp")
|
||||
if os.path.isfile(def_file):
|
||||
os.rename(def_file, def_file.replace(".cpp", ".cpp_"))
|
||||
def_file = os.path.join(default_client_out, "microRTPS_timesync.h")
|
||||
if os.path.isfile(def_file):
|
||||
os.rename(def_file, def_file.replace(".h", ".h_"))
|
||||
|
||||
@@ -466,6 +474,8 @@ def generate_client(out_dir):
|
||||
# Final steps to install client
|
||||
cp_wildcard(os.path.join(urtps_templates_dir,
|
||||
"microRTPS_transport.*"), out_dir)
|
||||
cp_wildcard(os.path.join(urtps_templates_dir,
|
||||
"microRTPS_timesync.*"), out_dir)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -177,8 +177,10 @@ rtps:
|
||||
id: 76
|
||||
- msg: test_motor
|
||||
id: 77
|
||||
- msg: timesync_status
|
||||
- msg: timesync
|
||||
id: 78
|
||||
receive: true
|
||||
send: true
|
||||
- msg: trajectory_waypoint
|
||||
id: 79
|
||||
receive: true
|
||||
|
||||
Reference in New Issue
Block a user