]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/dcf77/pd.py
srd_inst_decode(): Improve comments and log messages.
[libsigrokdecode.git] / decoders / dcf77 / pd.py
index adee4037323df77428d4ed8c8e409d8c3348287f..0f1d3d1910cf2dddba62f29395451448a4c9dc26 100644 (file)
 
 import sigrokdecode as srd
 import calendar
-
-# Return the specified BCD number (max. 8 bits) as integer.
-def bcd2int(b):
-    return (b & 0x0f) + ((b >> 4) * 10)
+from common.srdhelper import bcd2int
 
 class SamplerateError(Exception):
     pass
@@ -68,7 +65,7 @@ class Decoder(srd.Decoder):
         ('warnings', 'Warnings', (19,)),
     )
 
-    def __init__(self, **kwargs):
+    def __init__(self):
         self.samplerate = None
         self.state = 'WAIT FOR RISING EDGE'
         self.oldpins = None