Age | Commit message (Collapse) | Author |
|
Optionally let users pick the scale for terse timing annotation text.
Which potentially makes numbers show up earlier (at zoom levels of a
further distance). And drops the unit to present mere numbers, which
could speed up navigation during inspection. Keep providing automatic
scaling which then includes the unit text, as it did before.
Extend the automatic scaling to include picoseconds. Which avoids the
fallback to unit-less floating point with uncertain decimals when the
samplerate was 1GHz or higher.
Optionally present distances in terms of sample counts. This supports
decoder development, and can help users spot and judge glitches.
All "terse" presentation so far exclusively affects the 'time' row. It
remains an option for later to migrate averages and deltas as well. For
now it's assumed that high(er) precision and fine grained details are
more important for these rows.
|
|
Break text lines in the options declarations which have become rather
long. Rename 'samples' in the main loop to just 'sa', which better
matches the other 'ss', 'es', 't', etc identifers. Separate the code
for unconditional 'time' classes from optional averaging and deltas.
|
|
Reduce the amount of work which the timing decoder needs to do. Only
keep the deque() filled when averaging is active. Rephrase .put() calls
to reduce text line lengths (and for consistency with a pending change).
Move another options lookup for deltas out of the main loop.
|
|
In some situations (inspecting a dense run of pulses in a burst of data
communication) it takes a lot of zooming before the 'timing' decoder's
'time' annotations start revealing numbers. Which limits the number of
pulses which can fit in the visible trace area.
This is a stab at improving the usability of the timing decoder for
similar "crowded pulses" scenarios. Try to come up with an annotation
text that is shorter yet communicates the very details which the user
needs in this situation. Drop the frequency, avoid umlauts in the unit
text, don't use decimal places (use all integers within a scale). Even
offer to drop the unit text, assuming that a dense run of pulses results
in all times sharing their scale.
Make the terse presentation optional and off by default, and use a
separate annotation class for maximum backwards compatibility.
|
|
Consistently use ss and es identifiers for annotation emission to match
other decoders, as well as counting distances between sample points to
increase readability. This also dramatically reduces text line length.
|
|
Reduce the number of self members, use local variables instead for data
which is strictly kept within a method and need not remain across calls.
Move options dictionary lookups out of the main loop, as the previous
implementation already did with 'edge'.
|
|
Use symbolic identifiers for pin numbers and annotation classes. Remove
unused variables.
|
|
|
|
The SAE J1850 Variable Pulse Width decoder used to track and annotate
the width of pulses between edges, which duplicates existing features
of the 'timing' decoder. Remove this part from J1850, users can always
connect the input signal to multiple decoders as needed..
Also sort annotation rows while we are here. Top to bottom represents
raw wire bits to highest interpretation layer, as in other decoders.
|
|
Use symbolic identifiers for annotation classes, to improve readability
and maintainability.
|
|
IRC user pman92 reported that this decoder exists, and started migration
to the v3 API. This commit completes the migration, and adds missing
decoder infrastructure which has become mandatory recently.
Adjust the boilerplate: Drop FSF postal address. No Python output, add
category tag, unambiguous annotation class and row names. Add reset()
method. Use common code for edge detection.
This commit also addresses minor style nits. Pass the most recent
pulse's edges as ss and es to the data bit handling routine. Adjust
whitespace to unbreak editor navigation and to improve readability.
Use a more verbose name for the decoder, "vpw" appears a little short
and collision happy, and is not found when users search for "j1850".
[ Indentation changed, see whitespace ignoring diff for the essence. ]
Reported-By: pman92 <dpriestley92@hotmail.com>
|
|
Introduce a protocol decoder for the GM VPW 1x and 4x Vehicle Bus
(SAE J1850, or VPW for variable pulse width).
|
|
Do track the RX and TX information, including their bus IDs. Present bus
numbers as dotted quads. Emit another summary annotation for completed
frames which presents receiver, transmitter, payload, and ACK details at
even higher zoom levels. Rename the last remaining "init CRC" instance
for consistency.
|
|
Since the spec is vague on the subject, and real world captures were
found to occassionally run on odd clocks, internally prepare to inspect
traffic and interpret its content although the input data is invalid in
the strictest sense. Keep this hack internal, don't suggest to users
that invalid traffic would be perfectly acceptable.
|
|
Rename 'pjon-link' to 'pjon_link' for consistency with other decoders.
|
|
Introduce a protocol decoder which accepts 'pjon-link' Python input and
interprets PJON frames. The implementation is assumed to be operational
but most of the protocol's flexibility (optionally present and variable
width fields) has not yet been tested due to lack of example captures.
During development of the PJON decoder only the PJDL link layer decoder
was available, other link layers were not tested.
|
|
Introduce a protocol decoder which generates 'pjon-link' output from
'logic' input by interpreting the PJDL single wire serial communication
link layer of the PJON protocol stack. This decoder extracts frame
markers, data bytes, as well as their pad/sync decoration. Inspection of
data values, or checks for frame validity remain the responsibility of a
stacked decoder which is shared among several link layer types.
This implementation "violates" the PJDL spec in those places where the
spec is incomplete or vague, and real world traffic would not decode at
all when the strict letter of the spec is applied instead of its spirit.
When in doubt, the decoder implementation errs to the usability side.
Carrier sense detection is incomplete in this version. Data extraction
works for all currently available captures. Recovery from synchronization
loss after glitches is acceptable. Glitch filtering is missing (the spec
is silent on this subject).
|
|
Improve processing time by appending bits
instead of inserting them to the lists.
|
|
|
|
Drop the 0x prefix for each byte in annotations (for improved readability).
Also, use 02X instead of 02x (printf-style formats).
|
|
If those are useful for the decoder user, they should be annotations
using the Ann.WARN annotation class.
|
|
|
|
|
|
|
|
|
|
|
|
There were a few places where PyLong_FromLong() was used for uint64_t
numbers. Properly use PyLong_FromUnsignedLongLong() there, and also
fix a few additional size/signedness issues while we're here.
Reported (and partial patch provided) by "The Count" on Bugzilla, thanks!
This fixes bug #1499.
|
|
type_decoder.c:1040:16: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
1040 | { "register", (PyCFunction)Decoder_register, METH_VARARGS|METH_KEYWORDS,
| ^
|
|
On the Data row, the content of the single-byte registers is decoded as
follows: '<Meaning> <Value> <Unit>'. Initially, the meaning for these
registers was misplaced. This commit updates these meanings as they
really are.
Signed-off-by: Teo Perisanu <Teo.Perisanu@analog.com>
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Teo Perisanu <Teo.Perisanu@analog.com>
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Teo Perisanu <Teo.Perisanu@analog.com>
|
|
|
|
Drop the pure channel "marking" annotations, they're unneeded.
|
|
Since recent libsigrokdecode changes, annotation classes and rows must
not have overlapping IDs.
|
|
|
|
|
|
Signed-off-by: Teo Perisanu <Teo.Perisanu@analog.com>
|
|
|
|
|
|
|
|
The 'part' option is renamed to 'chip' (and 'ref' to 'vref') to be more
consistent with the naming used in other decoders.
|
|
|