diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-06-08 21:06:59 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-06-08 23:56:26 +0200 |
commit | abbc128575797da7b56b08940174229ce8fa8a9b (patch) | |
tree | 6269b4697516dbaec7b694a30c6947a4c551bc01 /decoders/dcf77 | |
parent | 173c919ca0788371935ae5aa6fee1f692087337d (diff) | |
download | libsigrokdecode-abbc128575797da7b56b08940174229ce8fa8a9b.tar.gz libsigrokdecode-abbc128575797da7b56b08940174229ce8fa8a9b.zip |
srd: dcf77: Bugfix, PD was broken.
Diffstat (limited to 'decoders/dcf77')
-rw-r--r-- | decoders/dcf77/dcf77.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/decoders/dcf77/dcf77.py b/decoders/dcf77/dcf77.py index 3a8134f..e84b3db 100644 --- a/decoders/dcf77/dcf77.py +++ b/decoders/dcf77/dcf77.py @@ -23,9 +23,6 @@ import sigrokdecode as srd import calendar -# Annotation feed formats -ANN_TEXT = 0 - # Return the specified BCD number (max. 8 bits) as integer. def bcd2int(b): return (b & 0x0f) + ((b >> 4) * 10) @@ -47,7 +44,6 @@ class Decoder(srd.Decoder): ] options = {} annotations = [ - # ANN_TEXT ['Text', 'Human-readable text'], ] @@ -225,13 +221,13 @@ class Decoder(srd.Decoder): self.bitcount = 0 self.bit_start_old = self.bit_start self.dcf77_bitnumber_is_known = 1 - # Don't switch to GET_BIT state this time. + # Don't switch to 'GET BIT' state this time. continue self.bit_start_old = self.bit_start - self.state = GET_BIT + self.state = 'GET BIT' - elif self.state == GET_BIT: + elif self.state == 'GET BIT': # Wait until the next falling edge occurs. if not (self.oldval == 1 and val == 0): self.oldval = val @@ -250,7 +246,7 @@ class Decoder(srd.Decoder): else: bit = -1 # TODO: Error? - # TODO: There's no bit 59, make sure none is decoded. + # There's no bit 59, make sure none is decoded. if bit in (0, 1) and self.bitcount in range(0, 58 + 1): self.handle_dcf77_bit(bit) self.bitcount += 1 |