From bee57ee84753471970f9b65b34e71c54a0558768 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 10 Mar 2014 15:44:24 +0100 Subject: [PATCH] ir_nec: Update to recent PD API changes. --- decoders/ir_nec/pd.py | 42 +++++++++++++++++++++--------------------- 1 file 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)), -- 2.30.2