From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 6 Dec 2021 18:48:38 +0000 (+0000) Subject: Continue to experiment with late follow-up correction weights. X-Git-Tag: 1.2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baf43f0bcc9fc68abbe5307aa4b338d22f7ba026;p=thirdparty%2Fnqptp.git Continue to experiment with late follow-up correction weights. --- diff --git a/nqptp-message-handlers.c b/nqptp-message-handlers.c index fafb3a4..9eeaeed 100644 --- a/nqptp-message-handlers.c +++ b/nqptp-message-handlers.c @@ -388,9 +388,13 @@ void handle_follow_up(char *buf, __attribute__((unused)) ssize_t recv_len, if (jitter > -10000000) { // we take any positive or a limited negative jitter as a sync event - if (jitter < 0) - offset = clock_private_info->previous_offset + jitter / 32; - else if (clock_private_info->follow_up_number < + if (jitter < 0) { + if (clock_private_info->follow_up_number < + (5 * 8)) // at the beginning (8 samples per second) + offset = clock_private_info->previous_offset + jitter / 16; + else + offset = clock_private_info->previous_offset + jitter / 16; + } else if (clock_private_info->follow_up_number < (5 * 8)) // at the beginning (8 samples per second) offset = clock_private_info->previous_offset + jitter / 2; // accept positive changes quickly