Commit 7608f764 authored by Alessandro Rubini's avatar Alessandro Rubini

wr-servo: fix following big jumps, and another unlikely situation

We were already following big jump, in theory, but we were missing a break
statement.  Now tracking jumps in the master is working.

The commit also fixes another details, zeroing an error counter when
restarting sync because of that very error counter.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 37a05faf
......@@ -379,15 +379,19 @@ int wr_servo_update(struct pp_instance *ppi)
} else {
s->missed_iters++;
}
if (s->missed_iters >= 10)
if (s->missed_iters >= 10) {
s->missed_iters = 0;
s->state = WR_SYNC_TAI;
}
break;
case WR_TRACK_PHASE:
s->skew = s->delta_ms - s->delta_ms_prev;
if (ts_offset_hw.seconds !=0 || ts_offset_hw.nanoseconds != 0)
if (ts_offset_hw.seconds || ts_offset_hw.nanoseconds) {
s->state = WR_SYNC_TAI;
break;
}
if(tracking_enabled) {
// just follow the changes of deltaMS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment