]> sigrok.org Git - libsigrokdecode.git/commit - decoders/ir_nec/pd.py
ir_nec: add support for extended NEC protocol (16bit address)
authorGerhard Sittig <redacted>
Sat, 25 Jul 2020 15:56:54 +0000 (17:56 +0200)
committerGerhard Sittig <redacted>
Sat, 25 Jul 2020 21:21:23 +0000 (23:21 +0200)
commit17e0ba228dadb7a12aa0e11fa81fcbc4a7836349
tree9dbb186a5df732c292e48862525c0da0b5bb97e2
parent025c728ed12e33121fb5be4ce14085afc2f23853
ir_nec: add support for extended NEC protocol (16bit address)

Add support for the extended NEC protocol, where the address field spans
16 bits and the complement is not sent. Commands still span 8 bits and
are sent in normal and in inverted form. The user needs to select the
extended protocol (off by default for compatibility), the input data
does not allow automatic detection of the protocol variant. It's also
not appropriate to assume the extended format when the address field
happens to fail the validity check.

The unfortunate mix of data value checks and annotation emission in
combination with "global" state makes this implementation more redundant
than I would like. A later cleanup is desirable.

This resolves bug #1583.
decoders/ir_nec/__init__.py
decoders/ir_nec/pd.py