Modify PI servo to set frequency when jumping.

Similarly to the servo in phc2sys, when clock is stepped, set
immediately also its frequency. This significantly improves the initial
convergence with large frequency offsets.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2013-01-14 17:09:10 +01:00 committed by Richard Cochran
parent ab29608e0b
commit af2a4f47fb
2 changed files with 2 additions and 0 deletions

View File

@ -867,6 +867,7 @@ enum servo_state clock_synchronize(struct clock *c,
case SERVO_UNLOCKED:
break;
case SERVO_JUMP:
clock_ppb(c->clkid, -adj);
clock_step(c->clkid, -c->master_offset);
c->t1 = tmv_zero();
c->t2 = tmv_zero();

1
pi.c
View File

@ -87,6 +87,7 @@ static double pi_sample(struct servo *servo,
break;
case 3:
*state = SERVO_JUMP;
ppb = s->drift;
s->count = 4;
break;
case 4: