X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=decoders%2Fdcf77%2Fdcf77.py;h=a02eb324c5bc9d7a58fa94bced537791ea984430;hb=ee3e279c7558b388410d16cbce9db6c80e9c0c67;hp=d8b9d3b1988151feab3e417b5a3c664ee33fd94e;hpb=122e9a90a54e034b93f554938896983d293edec1;p=libsigrokdecode.git diff --git a/decoders/dcf77/dcf77.py b/decoders/dcf77/dcf77.py index d8b9d3b..a02eb32 100644 --- a/decoders/dcf77/dcf77.py +++ b/decoders/dcf77/dcf77.py @@ -24,7 +24,7 @@ import sigrokdecode as srd import calendar # Annotation feed formats -ANN_ASCII = 0 +ANN_TEXT = 0 # Return the specified BCD number (max. 8 bits) as integer. def bcd2int(b): @@ -47,8 +47,8 @@ class Decoder(srd.Decoder): ] options = {} annotations = [ - # ANN_ASCII - ['ASCII', 'TODO: description'], + # ANN_TEXT + ['Text', 'Human-readable text'], ] def __init__(self, **kwargs): @@ -199,9 +199,7 @@ class Decoder(srd.Decoder): raise Exception('Invalid DCF77 bit: %d' % c) def decode(self, ss, es, data): - for samplenum, (val) in data: # TODO: Handle optional PON. - - self.samplenum += 1 # FIXME. Use samplenum. Off-by-one? + for (self.samplenum, (val)) in data: # TODO: Handle optional PON. if self.state == 'WAIT FOR RISING EDGE': # Wait until the next rising edge occurs.