Commit b000a735 authored by Alessandro Rubini's avatar Alessandro Rubini

fd-raw-input: bug fix for coarse calculation in '-p' mode

parent d6e413a9
......@@ -92,7 +92,7 @@ void event(uint32_t *a, char *name, int *seq, int mode, long double *t1,
case MODE_PICO:
p2 = a[FD_ATTR_TDC_COARSE] * 8000LL
+ a[FD_ATTR_TDC_FRAC] * 4096LL / 8000;
+ a[FD_ATTR_TDC_FRAC] * 8000LL / 4096;
delta = p2 - *p1;
if (delta < 0)
delta += 1000LL * 1000 * 1000 * 1000;
......
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