diff options
Diffstat (limited to 'aepd/main.c')
-rw-r--r-- | aepd/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/aepd/main.c b/aepd/main.c index b060361..080381d 100644 --- a/aepd/main.c +++ b/aepd/main.c @@ -45,6 +45,8 @@ void zero_fifo(void) aepd_shared->modulo_integer_chan_size = (MAX_FIFO_EXTENT / (aepd_shared->chans * sizeof(double) * 3)) * (aepd_shared->chans * sizeof(double) * 3); + aepd_shared->fifo_head_time = 0; + aepd_shared->fifo_tail_time = 0; } int add_fifo(void *data, unsigned int length) @@ -316,6 +318,9 @@ int main(int argc, char *argv[]) add_fifo(&sam[0], aepd_interface_result->chans * 3 * sizeof(double)); aepd_shared->fifo_head_time = aepd_interface_result->samtime; + if ((aepd_shared->fifo_head_time - aepd_shared->fifo_tail_time) > max_fifo_extent_seconds) + aepd_shared->fifo_tail_time = aepd_shared->fifo_head_time - max_fifo_extent_seconds; + if (aepd_shared->chans != aepd_interface_result->chans) { aepd_shared->chans = aepd_interface_result->chans; |