diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2018-10-13 00:49:06 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2018-10-13 00:49:06 +0200 |
commit | 43dc03965ffa8967884cf320660b0934463f3739 (patch) | |
tree | 3c5c48f3dd56cfdd9cabbcfae7881a460fbbbc53 /type_decoder.c | |
parent | 23db45031fe3406985ad3cf2216a7f61cf2a15d4 (diff) | |
download | libsigrokdecode-43dc03965ffa8967884cf320660b0934463f3739.tar.gz libsigrokdecode-43dc03965ffa8967884cf320660b0934463f3739.zip |
Decoder_put(): Add more info to OTUPUT_PYTHON log messages.
Diffstat (limited to 'type_decoder.c')
-rw-r--r-- | type_decoder.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/type_decoder.c b/type_decoder.c index 3142511..b90bdea 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -353,9 +353,12 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args) } pdo = l->data; - srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on oid %d.", - di->inst_id, start_sample, end_sample, - output_type_name(pdo->output_type), output_id); + /* Upon SRD_OUTPUT_PYTHON for stacked PDs, we have a nicer log message later. */ + if (pdo->output_type != SRD_OUTPUT_PYTHON && di->next_di != NULL) { + srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on oid %d.", + di->inst_id, start_sample, end_sample, + output_type_name(pdo->output_type), output_id); + } pdata.start_sample = start_sample; pdata.end_sample = end_sample; @@ -381,8 +384,10 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args) case SRD_OUTPUT_PYTHON: for (l = di->next_di; l; l = l->next) { next_di = l->data; - srd_spew("Sending %" PRIu64 "-%" PRIu64 " to instance %s", - start_sample, end_sample, next_di->inst_id); + srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on " + "oid %d to instance %s.", di->inst_id, start_sample, + end_sample, output_type_name(pdo->output_type), + output_id, next_di->inst_id); if (!(py_res = PyObject_CallMethod( next_di->py_inst, "decode", "KKO", start_sample, end_sample, py_data))) { |