Age | Commit message (Collapse) | Author |
|
instance.c:266:11: warning: declaration of ālā shadows a previous local [-Wshadow]
GSList *l = g_slist_nth(di->decoder->channels, i);
^
instance.c:206:9: note: shadowed declaration is here
GList *l;
^
|
|
|
|
instance.c:278:25: warning: The left operand of '!=' is a garbage value
if (new_channelmap[i] != -1)
~~~~~~~~~~~~~~~~~ ^
|
|
decoder.c:343:9: warning: Access to field 'ob_type' results in a dereference of a null pointer (loaded from variable 'py_default')
if (Py_TYPE(py_default) != Py_TYPE(py_item)) {
^~~~~~~~~~~~~~~~~~~
/usr/include/python3.6m/object.h:118:33: note: expanded from macro 'Py_TYPE'
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type_decoder.c:836:3: warning: Value stored to 'ret' is never read
ret = process_samples_until_condition_match(di, &found_match);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
instance.c:280:10: warning: Potential leak of memory pointed to by 'new_channelmap'
pdch = g_slist_nth(di->decoder->channels, i)->data;
^~~~~~~~~~~
|
|
type_decoder.c:206:2: warning: Potential leak of memory pointed to by 'pdb'
PyGILState_Release(gstate);
^~~~~~~~~~~~~~~~~~
|
|
type_decoder.c:197:10: warning: Potential leak of memory pointed to by 'pdb'
return SRD_ERR_MALLOC;
^~~~~~~~~~~~~~
|
|
For the converted calls there's no requirement for all struct fields
being memset()'d to zero, or all struct fields are explicitly set
later anyway.
|
|
|
|
|
|
|
|
|
|
Add the reset() method which recently has become essential. Make the A12
"memory bank" address line optional. Use more Python idioms. Update
comments.
The control signals had to move, to avoid gaps between D7 and A8 as well
as between A11 and A12 in the GUI decoder properties dialog. With
dynamic assignment in the UI and with named references in the CLI this
shall not harm. Unmodified automated tests still pass.
The logic is prepared to handle data, address, and "bank" pin groups at
arbitrary locations, A[11:8] and D[7:0] need not be adjacent any longer.
Support for more than one memory bank pin is prepared, but the number of
bank pins needs to get determined at the start of decode(), when this
feature is to get added in the future.
|
|
Decodes addresses and data read from an external ROM. The MCS-48
processors (8048, 8049, 8039, etc.) have an 8-bit data bus that latches
first the address then the data.
|
|
|
|
This fixes parts of bug #329.
|
|
The text presentation of decoder annotations' payload data was allocated
but not freed. As were the byte strings of binary output. Fix it.
This fixes parts of bug #329.
|
|
The API docs for libsigrokdecode are relatively small, no need for
the many, many subdirectories this would otherwise create.
|
|
|
|
|
|
This fixes bug #1066.
|
|
|
|
|
|
Improve robustness of the DCF77 decoder. Cope with "neiter 0 nor 1" bit
values (glitches can break the detection of pulse widths), as well as
unexpected bit numbers (more than 59 pulses per minute, can be a
follow-up error after e.g. glitches break one long pulse into two short
pulses). Do not process this invalid data, do emit error annotations.
|
|
Emit error annotations for invalid day of the week or month numbers,
instead of aborting decoder execution with an exception.
Implementation detail: Neither the Python 'in' keyword nor a .get()
method are available. That's why we have to catch the IndexError
exception.
This fixes bug #1173.
|
|
Create the text representation of a bit string by means of the builtin
.format() method and an appropriate specifier. Drop the non-obvious
sequence of bin() and slice and zfill() calls.
|
|
The previous implementation internally noticed the "want terminate"
request, and skipped decoder execution to faster get to the end of the
input stream. But an OK return code was provided in that code path, and
more input data was sent by applications (sometimes for many seconds or
few minutes).
Do return a new SRD_ERR_TERM_REQ error code, such that applications can
tell failed execution from requested termination.
|
|
It's uncertain why srd_inst_decode() which internally gets called by the
public srd_session_send() routine used to clear the want_wait_terminate
flag. This should be cleared upon decoder instance creation and state
reset, gets raised upon termination request, but shall not get cleared
in other spots, especially not upon the availability of new input data
while the stream shall be considered in the "about to terminate, skip
all subsequent execution" state.
|
|
Before this change, the loglevel check would only be performed for the
default log handler in libsigrokdecode, but not for other handlers set
via srd_log_callback_set().
This fixes bug #698.
|
|
|
|
|
|
|
|
The backtrace printing was actually already there, but was emitted using
sr_dbg(), which doesn't show up by default for most users. Make it an
srd_err() so that most users will see it.
This fixes bug #1158.
|
|
The decoder assumed a CRC cannot end with a stuffed bit but it actually can,
and the CRC delimiter then comes after the stuffed bit.
Patch by IRC/github user celeron55, wide testing by PeterMortensen, thanks!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Introduce a "reset" group of tests. Whip up a first test step which runs
the "terminate and reset" routine for decoder stacks after session
creation, start, and meta data setup. No input data gets processed, no
decoder output is tested yet.
|
|
Implement routines which terminate currently pending decoder operations
and reset internal state (on the C and Python sides) for instances as
well as sessions. This allows to re-use previously created stacks for
new input data.
|
|
Future implementations might call decoders' start() routine several
times, which makes them call register() again. It's desirable that the
common backend code copes with this condition, such that (the multitude
of) decoder implementations need not work around a specific constraint.
|
|
Have the Python C API check the argument type and do the type conversion
already. Raise an IndexError exception when the range check fails.
|
|
Introduce an oldpins_array_seed() helper routine, to make sure that each
call site which checks previous pin state will find valid data. This was
not always the case after decoder reset, which released the old pin data
while applications would not call srd_inst_new() again.
Preset newly allocated arrays with the default initial pin state, allow
optional application calls to specify differing initial values (when
specified by users), and keep the current state after first data was
processed.
|
|
|