summaryrefslogtreecommitdiff
path: root/decoders/rgb_led_ws281x
AgeCommit message (Collapse)Author
2023-07-29rgb_led_ws281x: rework the .decode() main loop, improve robustnessGerhard Sittig
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.
2023-07-29rgb_led_ws281x: refactor bit/bits handling, use more common codeGerhard Sittig
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.
2023-07-29rgb_led_ws281x: rephrase .put() calls for readabilityGerhard Sittig
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.
2023-07-29rgb_led_ws281x: use symbolic names for annotation classesGerhard Sittig
2020-07-18rgb_led_ws281x: Support RGBWStefan
Support of the now common RGBW type LED strips (uses 4 bytes instead of 3). Added an option to select RGB or RGBW
2020-01-01All PDs: Consistently use singular/plural for annotation classes/rows.Uwe Hermann
2019-11-29ws281x: Check for "None" before subtracting.Philipp Marek
2019-04-02decoders: Fix incorrect 'outputs' fields.Uwe Hermann
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.
2019-03-16decoders: Various cosmetic/consistency/typo fixes.Uwe Hermann
2019-03-15decoders: Add/update tags for each PD.Uwe Hermann
2017-12-22all decoders: introduce a reset() methodGerhard Sittig
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.
2017-06-21decoders: Rephrase condition-less .wait() calls (self documentation)Gerhard Sittig
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.
2017-06-16rgb_led_ws281x: Convert to PD API version 3.Uwe Hermann
2017-03-04rgb_led_ws281x: Use self.samplenum.Uwe Hermann
This is currently just a cosmetic change, but will make the conversion to the PDv3 API slightly easier and more readable.
2017-01-07license: remove FSF postal address from boiler plate license textGerhard Sittig
Remove the FSF postal address as it might change (it did in the past). Reference the gnu.org website instead which is more stable.
2016-05-26Consistency renames of {ss,es}_ variables.Uwe Hermann
2016-05-15Use consistent __init__() format across all PDs.Uwe Hermann
The previous **kwargs some PDs had is not actually ever used, so drop it.
2016-03-04Add an rgb_led_ws281x decoder.Uwe Hermann
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>