mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
microRTPS_timesync.cpp: fix style
This commit is contained in:
@@ -190,23 +190,23 @@ void TimeSync::processTimesyncMsg(timesync* msg) {
|
||||
@[ end if]@
|
||||
@[end if]@
|
||||
if (msg->sys_id() == 1 && msg->seq() != _last_remote_msg_seq) {
|
||||
if (msg->tc1() > 0) {
|
||||
_last_remote_msg_seq = msg->seq();
|
||||
if (msg->tc1() > 0) {
|
||||
_last_remote_msg_seq = msg->seq();
|
||||
|
||||
if (!addMeasurement(msg->ts1(), msg->tc1(), getMonoRawTimeNSec())) {
|
||||
std::cerr << "Offset not updated" << std::endl;
|
||||
}
|
||||
if (!addMeasurement(msg->ts1(), msg->tc1(), getMonoRawTimeNSec())) {
|
||||
std::cerr << "Offset not updated" << std::endl;
|
||||
}
|
||||
|
||||
} else if (msg->tc1() == 0) {
|
||||
_last_remote_msg_seq = msg->seq();
|
||||
} else if (msg->tc1() == 0) {
|
||||
_last_remote_msg_seq = msg->seq();
|
||||
|
||||
msg->timestamp() = getMonoTimeUSec();
|
||||
msg->sys_id() = 0;
|
||||
msg->seq()++;
|
||||
msg->tc1() = getMonoRawTimeNSec();
|
||||
msg->timestamp() = getMonoTimeUSec();
|
||||
msg->sys_id() = 0;
|
||||
msg->seq()++;
|
||||
msg->tc1() = getMonoRawTimeNSec();
|
||||
|
||||
_timesync_pub.publish(msg);
|
||||
}
|
||||
_timesync_pub.publish(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user