]> sigrok.org Git - libsigrokdecode.git/commitdiff
miller: Add missing 'binary' meta-data.
authorUwe Hermann <redacted>
Sun, 9 Sep 2018 17:18:02 +0000 (19:18 +0200)
committerUwe Hermann <redacted>
Sun, 9 Sep 2018 17:18:02 +0000 (19:18 +0200)
decoders/miller/pd.py

index 7ccd75eb9c337f9b18d95f997c176f184c88408e..562d14c10503a12b36a9b6a0b851c035d2a8eab0 100644 (file)
@@ -51,6 +51,9 @@ class Decoder(srd.Decoder):
         ('bitstring', 'Bitstring'),
     )
     annotation_rows = tuple((u, v, (i,)) for i, (u, v) in enumerate(annotations))
         ('bitstring', 'Bitstring'),
     )
     annotation_rows = tuple((u, v, (i,)) for i, (u, v) in enumerate(annotations))
+    binary = (
+        ('raw', 'Raw binary'),
+    )
 
     def __init__(self):
         self.samplerate = None
 
     def __init__(self):
         self.samplerate = None
@@ -176,7 +179,7 @@ class Decoder(srd.Decoder):
 
         numbytes = numbits // 8 + (numbits % 8 > 0)
         bytestring = bitvalue.to_bytes(numbytes, 'little')
 
         numbytes = numbits // 8 + (numbits % 8 > 0)
         bytestring = bitvalue.to_bytes(numbytes, 'little')
-        self.put(int(stringstart), int(stringend), self.out_binary, [1, bytestring])
+        self.put(int(stringstart), int(stringend), self.out_binary, [0, bytestring])
 
     def decode(self):
         while True:
 
     def decode(self):
         while True: