Gerhard Sittig [Fri, 3 Jul 2020 10:33:28 +0000 (12:33 +0200)]
timing: only queue when averaging, rephrase put calls
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.
Gerhard Sittig [Fri, 3 Jul 2020 10:12:40 +0000 (12:12 +0200)]
timing: optional terse format for timing annoations
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.
Gerhard Sittig [Fri, 3 Jul 2020 09:22:03 +0000 (11:22 +0200)]
timing: use ss/es for consistency
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.
Gerhard Sittig [Fri, 3 Jul 2020 09:14:31 +0000 (11:14 +0200)]
timing: reduce "state", most action is local to .decode()
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'.
Gerhard Sittig [Sat, 2 May 2020 13:08:41 +0000 (15:08 +0200)]
sae_j1850_vpw: drop the part which duplicates the timing decoder
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.
Gerhard Sittig [Sat, 2 May 2020 13:49:05 +0000 (15:49 +0200)]
sae_j1850_vpw: update for API v3, adjust to recent requirements
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. ]
Gerhard Sittig [Thu, 2 Jul 2020 19:15:00 +0000 (21:15 +0200)]
pjon: show "communication relations", and nits
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.
Gerhard Sittig [Thu, 2 Jul 2020 17:12:37 +0000 (19:12 +0200)]
pjdl: prepare for "stretched" timings
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.
Gerhard Sittig [Sat, 20 Jun 2020 07:31:18 +0000 (09:31 +0200)]
pjon: introduce decoder for PJON frame inspection
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.
Gerhard Sittig [Mon, 15 Jun 2020 11:37:18 +0000 (13:37 +0200)]
pjdl: introduce decoder for PJON single wire serial link layer
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).
Uwe Hermann [Fri, 22 May 2020 11:06:26 +0000 (13:06 +0200)]
Use PyLong_FromUnsignedLongLong() where needed.
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!
Teo Perisanu [Tue, 5 May 2020 09:46:34 +0000 (12:46 +0300)]
adxl345: Update register meaning for 0x21, 0x22, 0x23 regs.
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.
Uwe Hermann [Sun, 12 Jan 2020 18:07:14 +0000 (19:07 +0100)]
sdcard_sd: Rename some annotation classes.
The responses were simply named "R1" etc., but this becomes inconvenient
when Ann.prefixeѕ('R') is used and other annotation classes also have
names that start with 'R'. Hence, rename respose annotation classes to
"RESPONSE_R1" etc.
Uwe Hermann [Fri, 10 Jan 2020 23:17:44 +0000 (00:17 +0100)]
sdcard_sd: Remove a list that needs manual maintenance.
Instead of checking if a command is in a fixed list/tuple (that needs
to be manually updated every time a new command becomes supported),
simply check if the respective handling method for the command exists.
This fixes the bug of the CMD16 handler not being called, and will
prevent similar bugs in the future.