]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/uart/pd.py
uart: Fix a bug in the output for stacked PDs.
[libsigrokdecode.git] / decoders / uart / pd.py
index db1065dac4f42e1ec03e8f953518cd3ad435eeb4..151cae424fefefde3774dd2cdf4c00f314ef3679 100644 (file)
@@ -160,7 +160,7 @@ class Decoder(srd.Decoder):
         s, halfbit = self.startsample[rxtx], self.bit_width / 2.0
         self.put(s - floor(halfbit), self.samplenum + ceil(halfbit), self.out_binary, data)
 
-    def __init__(self, **kwargs):
+    def __init__(self):
         self.samplerate = None
         self.samplenum = 0
         self.frame_start = [-1, -1]
@@ -288,7 +288,7 @@ class Decoder(srd.Decoder):
         self.putbin(rxtx, [rxtx, bytes([b])])
         self.putbin(rxtx, [2, bytes([b])])
 
-        self.databits = [[], []]
+        self.databits[rxtx] = []
 
     def get_parity_bit(self, rxtx, signal):
         # If no parity is used/configured, skip to the next state immediately.