X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fem4100%2Fpd.py;h=778cfd1621e6a918977a9567b0f3898dd877c4f6;hb=392a5d1ef4bb356be248589dad28d0bd83411c49;hp=8c8a72bfb0092620293e96043243e1da516083b9;hpb=afb0d2339c0218627d6802a9138d78de57bab0a7;p=libsigrokdecode.git diff --git a/decoders/em4100/pd.py b/decoders/em4100/pd.py index 8c8a72b..778cfd1 100644 --- a/decoders/em4100/pd.py +++ b/decoders/em4100/pd.py @@ -62,6 +62,9 @@ class Decoder(srd.Decoder): ) def __init__(self): + self.reset() + + def reset(self): self.samplerate = None self.oldpin = None self.last_samplenum = None @@ -212,7 +215,7 @@ class Decoder(srd.Decoder): raise SamplerateError('Cannot decode without samplerate.') # Initialize internal state from the very first sample. - (pin,) = self.wait({'skip': 1}) + (pin,) = self.wait() self.oldpin = pin self.last_samplenum = self.samplenum self.lastlast_samplenum = self.samplenum