Age | Commit message (Collapse) | Author |
|
|
|
|
|
Bug #897 and my own experience caused me to improve the SPDIF decoder.
The following issues were addressed and resolved:
1. The Error: "srd: ValueError: Protocol decoder instance spdif-1:
invalid literal for int() with base 2: '121111012112021111012120'"
This error can happen if the sample rate is marginal. The correct function
of the decoder depends on the position of the data stream. The pulse width
calculation was wrong and the pulse width detection sometimes thought the
same pulse classes to be different.
The new decoder explicitly checks for short pulses and reports an error
with a corresponding message.
2. Bitrates were calculated wrong: The shown results were not usable at all.
The new decoder uses the first ten frames to calculate the bit rates and
uses the correct measurement units.
Possible issue: The bit rate calculation assumes an ongoing data stream.
It uses the time between the first and 10th frame.
They need to be sent without interruption. But this should be no problem
because SPDIF is meant to be a continuous stream.
3. A missing samplerate, e.g. when used in sigrok-cli with binary input, lead
to an error message on the original decoder.
The new decoder just skips the output of the bitrate if the samplerate is
missing. A missing samplerate no longer raises an error but only a message
in the data output.
4. The user was not informed about the integral steps of the decoder.
The new decoder shows the results of the synchronisation process at the
beginning. This can help to understand the behaviour of the decoder.
This fixes bug #897.
|
|
|
|
Generally show "bits" and other smaller annotations in rows that come
before "larger" annotations (in later rows).
|
|
Only add items to 'outputs' if the respective PD actually has
OUTPUT_PYTHON support implemented as of right now.
Various decoders might get OUTPUT_PYTHON support later, but the
'outputs' field should reflect the current status.
|
|
|
|
Move initialization code of protocol decoders from the constructor to a
new reset() helper method. The libsigrokdecode backend could run this
method several times to clear the decoder's internal state, before new
data from another acquisition gets fed to decode() calls.
|
|
This allows frontends to set the assumed initial pins (i.e., the assumed
state of the pins before the first sample of a capture) to user-specified
values.
The assumed initial pins can be either low, or high, or "use same value
as the first sample of the capture".
The special self.initial_pins decoder attribute is now removed.
|
|
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
|
|
|
|
The previous **kwargs some PDs had is not actually ever used, so drop it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|