]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/transitioncounter.py
srd: Finish consistency rename to ANN/PROTO.
[libsigrokdecode.git] / decoders / transitioncounter.py
index 5a6d140374eaab26363227bd41837c9142fb6ee7..9d437d1bfa156e06b51a2b8e7daf297e02779bba 100644 (file)
@@ -36,14 +36,14 @@ class Decoder(sigrokdecode.Decoder):
     options = {}
 
     def __init__(self, **kwargs):
-        self.output_protocol = None
-        self.output_annotation = None
+        self.out_proto = None
+        self.out_ann = None
         self.channels = -1
         self.lastsample = None
 
     def start(self, metadata):
-        # self.output_protocol = self.output_new(2)
-        self.output_annotation = self.output_new(1)
+        # self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTO, 'transitioncounter')
+        self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANN, 'transitioncounter')
 
     def report(self):
         pass
@@ -97,6 +97,6 @@ class Decoder(sigrokdecode.Decoder):
             outdata += [[self.transitions[i], self.rising[i], self.falling[i]]]
 
         if outdata != []:
-            # self.put(0, 0, self.output_protocol, out_proto)
-            self.put(0, 0, self.output_annotation, outdata)
+            # self.put(0, 0, self.out_proto, out_proto)
+            self.put(0, 0, self.out_ann, outdata)