Fix writing rtc data when called soon after trimrtc
This commit is contained in:
parent
78fc17c661
commit
6015f99d98
1 changed files with 5 additions and 0 deletions
|
@ -695,6 +695,7 @@ handle_relock_after_trim(void)
|
|||
LOG(LOGS_WARN, LOGF_RtcLinux, "Could not do regression after trim");
|
||||
}
|
||||
|
||||
coefs_valid = 0;
|
||||
n_samples = 0;
|
||||
n_samples_since_regression = 0;
|
||||
operating_mode = OM_NORMAL;
|
||||
|
@ -1044,6 +1045,10 @@ RTC_Linux_Trim(void)
|
|||
n_samples = 0;
|
||||
operating_mode = OM_AFTERTRIM;
|
||||
|
||||
/* Zero the offset in case writertc is called or chronyd
|
||||
is terminated during rapid sampling */
|
||||
coef_seconds_fast = 0.0;
|
||||
|
||||
/* And start rapid sampling, interrupts on now */
|
||||
if (timeout_running) {
|
||||
SCH_RemoveTimeout(timeout_id);
|
||||
|
|
Loading…
Reference in a new issue