From daf299388f671869a3e00a478fe0a1952cc361d6 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 2 Sep 2017 13:47:48 +0200 Subject: [PATCH] refactor: consistent naming of variables --- lib/nodes/signal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/nodes/signal.c b/lib/nodes/signal.c index 2a998b68c..661fa57fc 100644 --- a/lib/nodes/signal.c +++ b/lib/nodes/signal.c @@ -208,7 +208,7 @@ int signal_read(struct node *n, struct sample *smps[], unsigned cnt) struct signal *s = n->_vd; struct sample *t = smps[0]; - struct timespec now; + struct timespec ts_recv; int steps; assert(cnt == 1); @@ -220,22 +220,22 @@ int signal_read(struct node *n, struct sample *smps[], unsigned cnt) if (steps > 1) warn("Missed steps: %u", steps); - now = time_now(); + ts_recv = time_now(); } else { struct timespec offset = time_from_double(s->counter * 1.0 / s->rate); - now = time_add(&s->started, &offset); + ts_recv = time_add(&s->started, &offset); steps = 1; } - double running = time_delta(&s->started, &now); + double running = time_delta(&s->started, &ts_recv); t->ts.origin = - t->ts.received = now; + t->ts.received = ts_recv; t->sequence = s->counter; - t->length = s->values; + t->length = n->samplelen; for (int i = 0; i < MIN(s->values, t->capacity); i++) { int rtype = (s->type != SIGNAL_TYPE_MIXED) ? s->type : i % 5;