X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Ftransitioncounter.py;h=f401b1520d48a8f87d1d769eefb6215c4f0c8b9b;hp=1b105186116f69b859429b6e9c8fb06db109c06f;hb=3643fc3fe053bf531b4a7618d02c3d92c29f924b;hpb=f39d2404acb54461f61b676ab164d42e9e76e3fa diff --git a/decoders/transitioncounter.py b/decoders/transitioncounter.py index 1b10518..f401b15 100644 --- a/decoders/transitioncounter.py +++ b/decoders/transitioncounter.py @@ -42,11 +42,7 @@ class Decoder(): probes = {} options = {} - def __init__(self, unitsize, **kwargs): - # Metadata comes in here, we don't care for now. - # print kwargs - self.unitsize = unitsize - + def __init__(self, **kwargs): self.probes = Decoder.probes.copy() # TODO: Don't hardcode the number of channels. @@ -58,6 +54,9 @@ class Decoder(): self.rising = [0] * self.channels self.falling = [0] * self.channels + def start(self, metadata): + self.unitsize = metadata["unitsize"] + def report(self): pass