C-Netz: Make average to clock measurements for a quicker result

This commit is contained in:
Andreas Eversberg
2017-01-30 20:02:45 +01:00
parent 5026e161aa
commit faa3dfb7d4
2 changed files with 30 additions and 6 deletions

View File

@@ -51,6 +51,11 @@ struct clock_speed {
double start_ti[4]; /* time stamp for start of counting */
double last_ti[4]; /* time stamp of last received time */
uint64_t spl_count[4]; /* sample counter for sound card */
/* making average of measurement values */
double speed_ppm_rx[2][256]; /* history of clock speed measurements */
double speed_ppm_tx[2][256];
int idx; /* index of current value */
int num; /* total num of values so far */
};
/* instance of cnetz sender */