X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fsrd_usb.py;h=c68e82be3b0c606110c7a713f027badb3391359c;hb=5cc2d7bbc075ef6048bd5cd4e36533e874efb6a7;hp=396953291042b283ebb3172622182875264d8e2f;hpb=c66baa8cbe1d5f0b6d6c4fb8cbe8ca05fcdf7763;p=libsigrokdecode.git diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py index 3969532..c68e82b 100644 --- a/decoders/srd_usb.py +++ b/decoders/srd_usb.py @@ -118,13 +118,13 @@ class Decoder(sigrokdecode.Decoder): 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'] - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(1) + # self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTOCOL, 'usb') + self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANNOTATION, 'usb') 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.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)