fix timesync for timestamp sample (including SFINAE detection)

This commit is contained in:
Damien SIX
2021-05-16 13:15:37 -04:00
committed by Daniel Agar
parent ecf2cd3afb
commit e4f235001b
2 changed files with 9 additions and 3 deletions
+3
View File
@@ -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']@
}