diff options
author | Bert Vermeulen <bert@biot.com> | 2012-01-15 23:20:39 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2012-01-15 23:25:58 +0100 |
commit | 86528298fa2abfe825d6763b806095972e8bd8f4 (patch) | |
tree | 3960705cb28fdb72d8986569aed8d200c582b6d6 /type_logic.c | |
parent | a2c2afd9357fab233a4f09531618faa81d54d4d9 (diff) | |
download | libsigrokdecode-86528298fa2abfe825d6763b806095972e8bd8f4.tar.gz libsigrokdecode-86528298fa2abfe825d6763b806095972e8bd8f4.zip |
srd: PDs now get a logic feed with sample numbers, not time/duration
Diffstat (limited to 'type_logic.c')
-rw-r--r-- | type_logic.c | 6 |
1 files changed, 2 insertions, 4 deletions
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; } |