Added slave time sync suppression, which allows to use slave and master on the same node. Shall be documented later.

This commit is contained in:
Pavel Kirienko
2014-04-01 17:35:32 +04:00
parent 2dc8525823
commit e2fa613917
3 changed files with 45 additions and 1 deletions
@@ -18,7 +18,10 @@ void GlobalTimeSyncSlave::adjustFromMsg(const ReceivedDataStructure<protocol::Gl
static_cast<long long>(adjustment.toUSec()),
int(msg.getSrcNodeID().get()), int(msg.getIfaceIndex()));
getSystemClock().adjustUtc(adjustment);
if (!suppressed_)
{
getSystemClock().adjustUtc(adjustment);
}
last_adjustment_ts_ = msg.getMonotonicTimestamp();
state_ = Update;
}