]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/miller/pd.py
adxl345: Use SrdIntEnum for annotation classes.
[libsigrokdecode.git] / decoders / miller / pd.py
index 0ab5c4aae23fb324d84bb22a4279e324118f09a6..33214b14f600833ac49032eddd2f2c03867b467a 100644 (file)
@@ -38,7 +38,8 @@ class Decoder(srd.Decoder):
     desc = 'Miller encoding protocol.'
     license = 'gplv2+'
     inputs = ['logic']
-    outputs = ['miller']
+    outputs = []
+    tags = ['Encoding']
     channels = (
         {'id': 'data', 'name': 'Data', 'desc': 'Data signal'},
     )
@@ -50,12 +51,15 @@ class Decoder(srd.Decoder):
         ('bit', 'Bit'),
         ('bitstring', 'Bitstring'),
     )
-    annotation_rows = tuple((u, v, (i,)) for i, (u, v) in enumerate(annotations))
+    annotation_rows = tuple((u + 's', v + 's', (i,)) for i, (u, v) in enumerate(annotations))
     binary = (
         ('raw', 'Raw binary'),
     )
 
     def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.samplerate = None
 
     def metadata(self, key, value):