Commit e052a9be authored by Alessandro Rubini's avatar Alessandro Rubini

wr-servo: TRACK_PHASE now monitors delays to zero it

During track-phase we used to find the setpoint and then track changes in
the master-to-slave delay, thus not zeroing any initial error that may
happen (e.g. the initial sample was more jittery than average).

Now we use the clock offset as correction source. Setpoint is
adjusted by 1/4th of the current offset, to smooth a little the jitter.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 4070caf1
......@@ -393,8 +393,8 @@ int wr_servo_update(struct pp_instance *ppi)
/* Can be disabled for manually tweaking and testing */
if(tracking_enabled) {
// just follow the changes of deltaMS
s->cur_setpoint += (s->delta_ms - s->delta_ms_prev);
// adjust phase towards offset = 0 make ck0 0
s->cur_setpoint += (ts_offset_hw.phase / 4);
wrp->ops->adjust_phase(s->cur_setpoint);
pp_diag(ppi, time, 1, "adjust phase %i\n",
......
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