From a46b6ad55225c4e3fbd67b709382cb0799d86e45 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 16 Jun 2017 16:09:00 +0200 Subject: lpc: Convert to PD API version 3. --- decoders/lpc/pd.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/decoders/lpc/pd.py b/decoders/lpc/pd.py index d0dadaa..5e838cf 100644 --- a/decoders/lpc/pd.py +++ b/decoders/lpc/pd.py @@ -95,7 +95,7 @@ fields = { } class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'lpc' name = 'LPC' longname = 'Low-Pin-Count' @@ -312,8 +312,10 @@ class Decoder(srd.Decoder): self.tarcount = 0 self.state = 'IDLE' - def decode(self, ss, es, data): - for (self.samplenum, pins) in data: + def decode(self): + while True: + # TODO: Come up with more appropriate self.wait() conditions. + pins = self.wait({'skip': 1}) # If none of the pins changed, there's nothing to do. if self.oldpins == pins: -- cgit v1.2.3-70-g09d2