]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/onewire_network/pd.py
Probes, optional probes and annotations now take a tuple.
[libsigrokdecode.git] / decoders / onewire_network / pd.py
index 19ee649caeccf9d23a457f07c7c29a50867f932c..a9165726205c40e433b65542d442052741b615c1 100644 (file)
@@ -41,12 +41,9 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['onewire_link']
     outputs = ['onewire_network']
-    probes = []
-    optional_probes = []
-    options = {}
-    annotations = [
-        ['text', 'Human-readable text'],
-    ]
+    annotations = (
+        ('text', 'Human-readable text'),
+    )
 
     def __init__(self, **kwargs):
         self.beg = 0
@@ -60,7 +57,7 @@ class Decoder(srd.Decoder):
         self.rom = 0x0000000000000000
 
     def start(self):
-        self.out_proto = self.register(srd.OUTPUT_PYTHON)
+        self.out_python = self.register(srd.OUTPUT_PYTHON)
         self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
@@ -69,7 +66,7 @@ class Decoder(srd.Decoder):
 
     def puty(self, data):
         # Helper function for most protocol packets.
-        self.put(self.beg, self.end, self.out_proto, data)
+        self.put(self.beg, self.end, self.out_python, data)
 
     def decode(self, ss, es, data):
         code, val = data
@@ -80,7 +77,7 @@ class Decoder(srd.Decoder):
             self.bit_cnt = 0
             self.put(ss, es, self.out_ann,
                      [0, ['Reset/presence: %s' % ('true' if val else 'false')]])
-            self.put(ss, es, self.out_proto, ['RESET/PRESENCE', val])
+            self.put(ss, es, self.out_python, ['RESET/PRESENCE', val])
             self.state = 'COMMAND'
             return