mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 09:00:34 +08:00
microRTPS: add timesync for the agent side
This commit is contained in:
@@ -138,7 +138,7 @@ MavlinkTimesync::handle_message(const mavlink_message_t *msg)
|
||||
}
|
||||
|
||||
// Publish status message
|
||||
timesync_status_s tsync_status{};
|
||||
timesync_s tsync_status{};
|
||||
|
||||
tsync_status.timestamp = hrt_absolute_time();
|
||||
tsync_status.remote_timestamp = tsync.tc1 / 1000ULL;
|
||||
@@ -146,7 +146,7 @@ MavlinkTimesync::handle_message(const mavlink_message_t *msg)
|
||||
tsync_status.estimated_offset = (int64_t)_time_offset;
|
||||
tsync_status.round_trip_time = rtt_us;
|
||||
|
||||
_timesync_status_pub.publish(tsync_status);
|
||||
_timesync_pub.publish(tsync_status);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "mavlink_bridge_header.h"
|
||||
|
||||
#include <uORB/PublicationMulti.hpp>
|
||||
#include <uORB/topics/timesync_status.h>
|
||||
#include <uORB/topics/timesync.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -132,7 +132,7 @@ protected:
|
||||
*/
|
||||
void reset_filter();
|
||||
|
||||
uORB::PublicationMulti<timesync_status_s> _timesync_status_pub{ORB_ID(timesync_status)};
|
||||
uORB::PublicationMulti<timesync_s> _timesync_pub{ORB_ID(timesync)};
|
||||
|
||||
uint32_t _sequence{0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user