X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fdcf77%2Fdcf77.py;fp=decoders%2Fdcf77%2Fdcf77.py;h=53795926177345ffd9e22ad59586e12d9497e7c8;hp=b7e029dab8ff3c270a327d1a59d5550179de84b8;hb=decde15ecb51b3326b31019af61e0a729b9c61d0;hpb=385508e9b12d87519f9144a67e7682b46a592200 diff --git a/decoders/dcf77/dcf77.py b/decoders/dcf77/dcf77.py index b7e029d..5379592 100644 --- a/decoders/dcf77/dcf77.py +++ b/decoders/dcf77/dcf77.py @@ -57,6 +57,9 @@ class Decoder(srd.Decoder): probes = [ {'id': 'data', 'name': 'DATA', 'desc': 'DATA line'}, ] + extra_probes = [ + {'id': 'pon', 'name': 'PON', 'desc': 'TODO'}, + ] options = {} annotations = [ # ANN_ASCII @@ -211,7 +214,7 @@ class Decoder(srd.Decoder): raise Exception('Invalid DCF77 bit: %d' % c) def decode(self, ss, es, data): - for samplenum, (pon, val) in data: # FIXME + for samplenum, (val) in data: # TODO: Handle optional PON. self.samplenum += 1 # FIXME. Use samplenum. Off-by-one? @@ -272,7 +275,7 @@ class Decoder(srd.Decoder): self.state = WAIT_FOR_RISING_EDGE else: - raise Exception('Invalid state: %s' % self.state) + raise Exception('Invalid state: %d' % self.state) self.oldval = val