summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-03-10 15:44:24 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2014-03-10 15:44:24 +0100
commitbee57ee84753471970f9b65b34e71c54a0558768 (patch)
tree2b0eff0e4fa8dd143cee3a6d855e8477ab64991f /decoders
parent12fecc8ffc48a92ce1678aa9b4988f85bebe21a9 (diff)
downloadlibsigrokdecode-bee57ee84753471970f9b65b34e71c54a0558768.tar.gz
libsigrokdecode-bee57ee84753471970f9b65b34e71c54a0558768.zip
ir_nec: Update to recent PD API changes.
Diffstat (limited to 'decoders')
-rw-r--r--decoders/ir_nec/pd.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/decoders/ir_nec/pd.py b/decoders/ir_nec/pd.py
index 459cbe2..b01af9e 100644
--- a/decoders/ir_nec/pd.py
+++ b/decoders/ir_nec/pd.py
@@ -30,28 +30,28 @@ class Decoder(srd.Decoder):
license = 'gplv2+'
inputs = ['logic']
outputs = ['ir_nec']
- probes = [
+ probes = (
{'id': 'ir', 'name': 'IR', 'desc': 'Data line'},
- ]
- optional_probes = []
- options = {
- 'polarity': ['Polarity', 'active-low'],
- }
- annotations = [
- ['bit', 'Bit'],
- ['agc-pulse', 'AGC pulse'],
- ['longpause', 'Long pause'],
- ['shortpause', 'Short pause'],
- ['stop-bit', 'Stop bit'],
- ['leader-code', 'Leader code'],
- ['addr', 'Address'],
- ['addr-inv', 'Address#'],
- ['cmd', 'Command'],
- ['cmd-inv', 'Command#'],
- ['repeat-code', 'Repeat code'],
- ['remote', 'Remote'],
- ['warnings', 'Warnings'],
- ]
+ )
+ options = (
+ {'id': 'polarity', 'desc': 'Polarity', 'default': 'active-low',
+ 'values': ('active-low', 'active-high')},
+ )
+ annotations = (
+ ('bit', 'Bit'),
+ ('agc-pulse', 'AGC pulse'),
+ ('longpause', 'Long pause'),
+ ('shortpause', 'Short pause'),
+ ('stop-bit', 'Stop bit'),
+ ('leader-code', 'Leader code'),
+ ('addr', 'Address'),
+ ('addr-inv', 'Address#'),
+ ('cmd', 'Command'),
+ ('cmd-inv', 'Command#'),
+ ('repeat-code', 'Repeat code'),
+ ('remote', 'Remote'),
+ ('warnings', 'Warnings'),
+ )
annotation_rows = (
('bits', 'Bits', (0, 1, 2, 3, 4)),
('fields', 'Fields', (5, 6, 7, 8, 9, 10)),