mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 05:41:36 +08:00
Fixed timestamp synchronization
This commit is contained in:
@@ -2177,8 +2177,9 @@ void MavlinkReceiver::print_status()
|
|||||||
|
|
||||||
uint64_t MavlinkReceiver::sync_stamp(uint64_t usec)
|
uint64_t MavlinkReceiver::sync_stamp(uint64_t usec)
|
||||||
{
|
{
|
||||||
if (_time_offset > 0) {
|
|
||||||
return usec - (_time_offset / 1000) ;
|
if (_time_offset != 0) {
|
||||||
|
return usec + (_time_offset / 1000) ;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return hrt_absolute_time();
|
return hrt_absolute_time();
|
||||||
|
|||||||
Reference in New Issue
Block a user