Age | Commit message (Collapse) | Author |
|
Concentrate timestamp gathering in the .decode() method, eliminate
instance members by using variables that are local to the method.
Finally use appropriate PD API v3 invocations. Use edge conditions plus
a counted 'skip' to detect the RESET pulse. Use a positive "check the
reset condition" logic, simplify the conditions which support the reset
pulse tracking, and which flush previously accumulated data when "the
bit time doesn't end" (the next edge is missing).
Improve robustness in those cases where captures use low oversampling
and similar length high and low pulses. The fixed (rather arbitrary?)
625us threshold resulted in several false last-bit values after the
API v3 conversion.
Heavily comment on this edge/pulse detection and timestamps logic,
since it's non-trivial and non-obvious. Keep all behaviour backwards
compatible before extending the feature set in future commits.
|
|
Pass all .decode() routine's bit handling through a common bit handler.
Accumulate the bit values as well as their ss/es timestamps. Reduce code
duplication in the bits handler. Use common support code to get the
24/32 bit wide integer from the list of bits. Prepare to handle streams
of different per-pixel length or layout.
This commit remains backwards compatible, and keeps all warts of the
previous implementation including inconsistent annotation order. Just
eliminates unnecessary instance members and hidden coupling, to keep
timestamp handling in the .decode() method.
|
|
Separate the construction of the list of texts for different zoom levels
from the emission of annotations. Use a .putg() helpers to match other
decoder implementations. Prefer .format() calls over "modulo" operations
on strings.
|
|
|
|
Support of the now common RGBW type LED strips (uses 4 bytes instead of 3).
Added an option to select RGB or RGBW
|
|
|
|
|
|
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.
|
|
Telling .wait() to "skip one sample" slightly obfuscates the intent of
getting the next samples while no condition applies. Explicitly pass no
condition arguments instead, to better reflect the purpose. Coincidently
these .wait() calls will execute in slightly less expensive code paths
in the common code.
|
|
|
|
This is currently just a cosmetic change, but will make the conversion
to the PDv3 API slightly easier and more readable.
|
|
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.
|
|
This decoder handles the WS2812B protocol (and possibly WS2811).
Example dump already exists: led/ws281x/ws281x_4ch_5mhz.sr.
Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
|