summaryrefslogtreecommitdiff
path: root/decoders/sdq/pd.py
AgeCommit message (Collapse)Author
2020-08-12sdq: prefer Python's .format() method for string formattingGerhard Sittig
Prefer the .format() method over the % operator. Also vertically align the non-trivial text alternatives for different zoom levels to simplify comparison and adjustment during maintenance.
2020-08-12sdq: use symbolic names for pins and annotation classesGerhard Sittig
Eliminate magic numbers which are too hard to read and too easy to get wrong during maintenance. Prefer symbolic identifiers instead for pins and annotation classes.
2020-08-12sdq: simplify decode routine, no state machine requiredGerhard Sittig
Move the initial synchronization to the input data out of the main loop, and handle the BREAK symbol when it was seen. Turns out that no state machine is required to decode the SDQ protocol. [ best viewed as a whitespace ignoring diff ]
2020-08-12sdq: only use samplerate and options values after validity checkGerhard Sittig
Move the calculation which involves the samplerate as well as user provided options out of the meta packet reception and to the top of the decode() method. Especially only use the samplerate after it was tested for availability.
2020-08-12sdq: use common bits to number conversionGerhard Sittig
2020-08-12sdq: Add the SDQ protocol decoderPhilip Ã…kesson
[ gsi: minor whitespace adjustment ]