]> sigrok.org Git - libsigrokdecode.git/commit
dmx512: stack DMX512 on top of UART and improve usability
authorGerhard Sittig <redacted>
Wed, 27 Nov 2019 20:54:11 +0000 (21:54 +0100)
committerUwe Hermann <redacted>
Sat, 4 Jan 2020 23:28:12 +0000 (00:28 +0100)
commitdca19fbfdf0650dba693c0ac6213f6cdb748a8c3
tree77b796a3ccebbc15a760d1dcc9e395bd4a062a93
parentff539df5539c19cf2a303b03083374d33598c296
dmx512: stack DMX512 on top of UART and improve usability

It was unfortunate that the previous DMX512 decoder implementation
re-invented UART decoder features and introduced new issues in the
process. Automatic polarity detection is just impossible when the full
set of valid DMX timings is to get supported. Sample numbers suffered
from floating point rounding errors.

Introduce a stacked decoder on top of UART which exclusively deals with
DMX512 details, and transparently benefits from all available UART
features (adjustable polarity, robust and correct sampling, data byte
accumulation, BREAK detection while silencing false STOP violations). On
one hand this requires users to specify the bitrate (250kbps), on the
other hand it results in reliable operation for all captures that have
become available so far.

Provide Python output for stacked decoders which can process protocol
extensions like RDM. Prepare the DMX512 decoder itself to handle simple
cases of protocol extensions (start codes other than 0). Add support for
additional constraint checks, emit warnings when user specified limits
are violated: short BREAK, long MARK, long RESET to RESET and short
BREAK to BREAK intervals. This shall speedup the identification of bus
health issues (data loss or corruption) or improper controller timing.

Also hide all-zero values by default, to make used channels visually
stand out, and help users focus their attention. For special cases (like
16bit data, or zero being a valid set-point for the channels) users can
enforce the display of all values. Provide an option to present byte
values to users in the most appropriate format for the use case.

This resolves bug #1442.
decoders/dmx512/__init__.py [new file with mode: 0644]
decoders/dmx512/pd.py [new file with mode: 0644]