mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Fixed timestamp synchronization
This commit is contained in:
parent
f69e9a3d37
commit
5bd574dd05
@ -2177,8 +2177,9 @@ void MavlinkReceiver::print_status()
|
||||
|
||||
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 {
|
||||
return hrt_absolute_time();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user