]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/srd_usb.py
srd: Finish consistency rename to ANN/PROTO.
[libsigrokdecode.git] / decoders / srd_usb.py
index 396953291042b283ebb3172622182875264d8e2f..c97ef730ea80e9f100cb21ab783740c9600be941 100644 (file)
@@ -118,13 +118,13 @@ class Decoder(sigrokdecode.Decoder):
     options = {}
 
     def __init__(self):
     options = {}
 
     def __init__(self):
-        self.output_protocol = None
-        self.output_annotation = None
+        self.out_proto = None
+        self.out_ann = None
 
     def start(self, metadata):
         self.rate = metadata['samplerate']
 
     def start(self, metadata):
         self.rate = metadata['samplerate']
-        # self.output_protocol = self.output_new(2)
-        self.output_annotation = self.output_new(1)
+        # self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTO, 'usb')
+        self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANN, 'usb')
         if self.rate < 48000000:
             raise Exception("Sample rate not sufficient for USB decoding")
         # Initialise decoder state.
         if self.rate < 48000000:
             raise Exception("Sample rate not sufficient for USB decoding")
         # Initialise decoder state.
@@ -182,6 +182,6 @@ class Decoder(sigrokdecode.Decoder):
             self.sym = sym
 
         if out != []:
             self.sym = sym
 
         if out != []:
-            # self.put(0, 0, self.output_protocol, out_proto)
-            self.put(0, 0, self.output_annotation, out)
+            # self.put(0, 0, self.out_proto, out_proto)
+            self.put(0, 0, self.out_ann, out)