From: Uwe Hermann Date: Mon, 10 Mar 2014 14:44:24 +0000 (+0100) Subject: ir_nec: Update to recent PD API changes. X-Git-Tag: libsigrokdecode-0.3.0~53 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=bee57ee84753471970f9b65b34e71c54a0558768 ir_nec: Update to recent PD API changes. --- 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)),