diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2020-07-18 19:45:22 +0200 |
---|---|---|
committer | Gerhard Sittig <gerhard.sittig@gmx.net> | 2020-07-18 20:37:40 +0200 |
commit | 95435ac233c861b51da34862894f2db7a681be3c (patch) | |
tree | 783ad1170189ffb8de53cf67d410fff381f3fb63 /decoders/ade77xx/__init__.py | |
parent | b213c0461126495175aaa36fba85f50606594e39 (diff) | |
download | libsigrokdecode-95435ac233c861b51da34862894f2db7a681be3c.tar.gz libsigrokdecode-95435ac233c861b51da34862894f2db7a681be3c.zip |
caliper: use common code for bit accumulation
There is only one annotation, rename ss/es for consistency with other
decoders. Move a conversion constant to the top of the source file, and
rename some identifiers to increase readability of math expressions.
There is no point in constructing numbers in MSB first order and then
reversing their bit order. Prefer Python lists for accumulated bits, and
common code for number conversion. Use one code block for the extraction
and conversion of received data instead of a set of scattered lines.
This shall increase readability of the data extraction, and eliminates
redundancy in the implementation.
Diffstat (limited to 'decoders/ade77xx/__init__.py')
0 files changed, 0 insertions, 0 deletions