mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 18:13:34 +08:00
fix timesync for timestamp sample (including SFINAE detection)
This commit is contained in:
@@ -109,8 +109,11 @@ void RtpsTopics::publish(uint8_t topic_ID, char data_buffer[], size_t len)
|
||||
@[ end if]@
|
||||
// apply timestamp offset
|
||||
uint64_t timestamp = getMsgTimestamp(&st);
|
||||
uint64_t timestamp_sample = getMsgTimestampSample(&st);
|
||||
_timesync->subtractOffset(timestamp);
|
||||
setMsgTimestamp(&st, timestamp);
|
||||
_timesync->subtractOffset(timestamp_sample);
|
||||
setMsgTimestampSample(&st, timestamp_sample);
|
||||
_@(topic)_pub.publish(&st);
|
||||
@[ if topic == 'Timesync' or topic == 'timesync']@
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user