X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Ftransitioncounter.py;h=8cb32bb772029507ec8e721f3bf3622e61843dd5;hb=876f83fd3396ce581e700741e58414c2f4f6277e;hp=40fa3a899041420269d91e4f156c8a3dc3c1697f;hpb=9a12a6e7af3d7091d8e35dd1c731402cb80a01b0;p=libsigrokdecode.git diff --git a/decoders/transitioncounter.py b/decoders/transitioncounter.py index 40fa3a8..8cb32bb 100644 --- a/decoders/transitioncounter.py +++ b/decoders/transitioncounter.py @@ -23,7 +23,7 @@ import sigrokdecode as srd class Decoder(srd.Decoder): id = 'transitioncounter' name = 'Transition counter' - longname = '...' + longname = 'Pin transition counter' desc = 'Counts rising/falling edges in the signal.' longdesc = '...' author = 'Uwe Hermann' @@ -33,7 +33,9 @@ class Decoder(srd.Decoder): outputs = ['transitioncounts'] probes = [] options = {} - annotations = [] + annotations = [ + ['TODO', 'TODO'], + ] def __init__(self, **kwargs): self.channels = -1 @@ -46,7 +48,7 @@ class Decoder(srd.Decoder): def report(self): pass - def decode(self, timeoffset, duration, data): + def decode(self, ss, es, data): for (samplenum, s) in data: @@ -96,5 +98,5 @@ class Decoder(srd.Decoder): if outdata != []: # self.put(0, 0, self.out_proto, out_proto) - self.put(0, 0, self.out_ann, outdata) + self.put(0, 0, self.out_ann, [0, [str(outdata)]])