Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For the time being, both APIs (2 and 3) will remain supported until all
decoders have been converted to API version 3. Then, support for API
version 2 will be dropped.
Decoders using PD v3 API can benefit from both readability improvements
as well as performance improvements. Up to 10x speedup has been measured
in some situations (depends a lot on the decoder, the amount of data,
the amount of edges in the signals, the amount of oversampling etc. etc.).
This is only the first set of (basic) performance improvements for
libsigrokdecode, there are various additional opportunities for further
changes to improve performance.
This changeset has been tested to survive a run of all the test-cases in
the sigrok-test repo without issues (for the converted PDs), however it is
not very well-tested yet, so there might be regressions that need to be
addressed.
|
|
|
|
Alpha-sort the list of installed items, to support developers which scan
the list for newly added items. Factor out the logic which pretty prints
installed items while maintaining a maximum screen output line length.
|
|
Signed-off-by: Karl Palsson <karlp@etactica.com>
|
|
Old versions triggered valgrind errors as the API method to remove an
entry modifies the list that was being iterated.
Signed-off-by: Karl Palsson <karlp@etactica.com>
|
|
|
|
|
|
This is not entirely correct yet, will be fixed later.
|
|
|
|
|
|
|
|
This fixes bug #845.
|
|
|
|
|
|
|
|
Several checks get applied when loading externally provided protocol
decoders. Print error messages when checks fail, so that developers can
better resolve issues.
The sequence of tests terminates upon the first failed check, while
decoders may suffer from several issues at the same time. This is
considered acceptable, as it reduces the commit's size and the code's
complexity. This commit only adds error messages, and does not change
logic/behaviour.
Failed API version checks result in two messages: One specific message
which reflects the decoder's version and what's supported by the loader,
and a generic message that the API version check has failed. This is
done to simplify the logic of a rarely used error code path.
This commit addresses libsigrokdecode Bug 704, and allows to identify
decoders from parallel installations of differing version.
This fixes bug #704.
Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
|
|
In the absence of respective instructions, git will use a rather generic
approach to generate diffs and patches. Introduce a git attributes file
which results in improved output for Python sources (i.e. all protocol
decoders).
Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
|
|
For wordsizes > 8, multiple bytes are used (big-endian).
This fixes bug #686.
|
|
This is in almost all cases what the user will want, only rarely ASCII
(the old default) will be the more natural fit.
|
|
For 5..8 data bits the binary output will be 1 byte, for 9 data bits
it will be 2 bytes (big-endian).
This fixes bug #708.
|
|
When the start bit is not low at its sample point, then stop trying
to interpret the remaining frame -- it's already known to be invalid,
anyway.
Wait for the next start bit instead, assuming that either the falling
edge which started the inspection of the UART frame and its start bit
was a spurious glitch or that the captured signal does not communicate
at the decoder's configured bitrate.
Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
|
|
Factor out the code which generates a textual representation for the
numeric values that were communicated via UART bit patterns. Make the
width of the output text depend on the number of bits in the UART frame
(five to nine) instead of assuming bytes of exactly eight bits.
Fix other minor issues while we are here: Nine bits result in a number
range of 0 to 511 (not 512). ASCII codes 30 and 31 are non-printables.
The previous implementation skipped a significant leading digit in the
octal representation.
Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
|
|
Given the generic nature of UART communication and the supported range
for the data width, "byte" may be a misleading name for the numeric
value that gets communicated in five to nine data bits. Rename the
"databyte" variable to "datavalue".
Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Handle "Running Status" where status byte can be omitted
- SysEx message can be terminated by status byte, not just EOX
- Handle SysReal messages that interrupt in-progress message transmission
- Identify and print garbage / truncated data
- Add 2 new annotations: text-sysreal-verbose and text-error
|
|
(ex: note 60 is middle C which is C4, not C3)
|
|
The UART bit information was not transmitted correctly to stacked PDs
if there was an overlap between RX and TX bytes in the data.
|
|
|
|
short lengths
|
|
This causes an issue when running the sigrok-test test-cases, so drop
it for now (the same check already exists in decode()).
This fixes bug #758.
|