Fixed timestamp synchronization

This commit is contained in:
tommises 2016-07-09 11:09:19 -06:00 committed by Lorenz Meier
parent f69e9a3d37
commit 5bd574dd05

View File

@ -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();