mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 18:52:46 +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)
|
||||
{
|
||||
if (_time_offset > 0) {
|
||||
return usec - (_time_offset / 1000) ;
|
||||
|
||||
if (_time_offset != 0) {
|
||||
return usec + (_time_offset / 1000) ;
|
||||
|
||||
} else {
|
||||
return hrt_absolute_time();
|
||||
|
||||
Reference in New Issue
Block a user