]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/pan1321/pd.py
srd_inst_decode(): Make the code API version dependent.
[libsigrokdecode.git] / decoders / pan1321 / pd.py
index 7edd1c893b07a091ab4a9477a190dd4b480ebaad..a8938c60f6bd961f6972bf275be58004d75de025 100644 (file)
@@ -39,7 +39,7 @@ class Decoder(srd.Decoder):
         ('warnings', 'Human-readable warnings'),
     )
 
-    def __init__(self, **kwargs):
+    def __init__(self):
         self.cmd = ['', '']
         self.ss_block = None
 
@@ -136,6 +136,9 @@ class Decoder(srd.Decoder):
         if ptype != 'DATA':
             return
 
+        # We're only interested in the byte value (not individual bits).
+        pdata = pdata[0]
+
         # If this is the start of a command/reply, remember the start sample.
         if self.cmd[rxtx] == '':
             self.ss_block = ss
@@ -156,4 +159,3 @@ class Decoder(srd.Decoder):
             self.handle_host_command(rxtx, self.cmd[rxtx][:-2])
 
         self.cmd[rxtx] = ''
-