diff --git a/local.c b/local.c index 80fb6ba..b32d0c6 100644 --- a/local.c +++ b/local.c @@ -563,6 +563,8 @@ void LCL_NotifyExternalTimeStep(struct timespec *raw, struct timespec *cooked, double offset, double dispersion) { + LCL_CancelOffsetCorrection(); + /* Dispatch to all handlers */ invoke_parameter_change_handlers(raw, cooked, 0.0, offset, LCL_ChangeUnknownStep); diff --git a/sys_generic.c b/sys_generic.c index 6e29ee2..2e79a1b 100644 --- a/sys_generic.c +++ b/sys_generic.c @@ -109,12 +109,7 @@ static void handle_step(struct timespec *raw, struct timespec *cooked, double dfreq, double doffset, LCL_ChangeType change_type, void *anything) { - if (change_type == LCL_ChangeUnknownStep) { - /* Reset offset and slewing */ - slew_start = *raw; - offset_register = 0.0; - update_slew(); - } else if (change_type == LCL_ChangeStep) { + if (change_type == LCL_ChangeStep) { UTI_AddDoubleToTimespec(&slew_start, -doffset, &slew_start); } }