X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fsrd_usb.py;h=c97ef730ea80e9f100cb21ab783740c9600be941;hp=ce1bd68339e04d087ba12c48220ed11c5b11b876;hb=94d43b37bd34263f5ed9f7135aac5fe7413c7f07;hpb=2fd89a85c4a1131ca259d794a43b26b8bd84b6a0 diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py index ce1bd68..c97ef73 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.add(2) - self.output_annotation = self.add(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. @@ -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)