From 86528298fa2abfe825d6763b806095972e8bd8f4 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Sun, 15 Jan 2012 23:20:39 +0100 Subject: srd: PDs now get a logic feed with sample numbers, not time/duration --- type_logic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'type_logic.c') diff --git a/type_logic.c b/type_logic.c index 2f79234..851a42e 100644 --- a/type_logic.c +++ b/type_logic.c @@ -56,16 +56,14 @@ PyObject *srd_logic_iternext(PyObject *self) sample >>= 1; } - /* TODO: samplenum should be in the inbuf feed, instead of time/duration. - * fake it for now... - */ /* Prepare the next samplenum/sample list in this iteration. */ - py_samplenum = PyLong_FromUnsignedLongLong(logic->itercnt++); + py_samplenum = PyLong_FromUnsignedLongLong(logic->start_samplenum + logic->itercnt); PyList_SetItem(logic->sample, 0, py_samplenum); py_samples = PyBytes_FromStringAndSize((const char *)probe_samples, logic->di->num_probes); PyList_SetItem(logic->sample, 1, py_samples); Py_INCREF(logic->sample); + logic->itercnt++; return logic->sample; } -- cgit v1.2.3-70-g09d2