]> sigrok.org Git - libsigrokdecode.git/commit - decoders/ir_nec/pd.py
ir_nec: use common helper for bit accumulation
authorGerhard Sittig <redacted>
Sat, 25 Jul 2020 15:55:26 +0000 (17:55 +0200)
committerGerhard Sittig <redacted>
Sat, 25 Jul 2020 21:18:21 +0000 (23:18 +0200)
commit025c728ed12e33121fb5be4ce14085afc2f23853
tree3f01295a908847d2d339b2c1794377209ab3e0d7
parentd478372a132d1872426f96f5f0d06119392805f7
ir_nec: use common helper for bit accumulation

The input signal's polarity ('active' variable) is strictly local to the
decode() method. The 'count' becomes obsolete when 'data' is kept in a
Python list. Conversion of bit patterns to numbers is provided by common
helpers. Alpha-sort Python imports while we are here.

This commit also renames a few variables in the normal/inverted check
for valid input data. Which can help the introduction of support for the
extended protocol, by decoupling what gets checked and what gets shown.
decoders/ir_nec/pd.py