]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/graycode/pd.py
All PDs: Consistently use singular/plural for annotation classes/rows.
[libsigrokdecode.git] / decoders / graycode / pd.py
index ef5d51352fe25356da1e9c47faf9c0487a5c3f4c..f3d45abcc0d0f544a28b0125c7aacd381ddac45b 100644 (file)
@@ -77,10 +77,11 @@ class Decoder(srd.Decoder):
     id = 'graycode'
     name = 'Gray code'
     longname = 'Gray code and rotary encoder'
-    desc = 'Accumulate rotary encoder increments, provide timing statistics.'
+    desc = 'Accumulate rotary encoder increments, provide statistics.'
     license = 'gplv2+'
     inputs = ['logic']
-    outputs = ['graycode']
+    outputs = []
+    tags = ['Encoding']
     optional_channels = tuple(
         {'id': 'd{}'.format(i), 'name': 'D{}'.format(i), 'desc': 'Data line {}'.format(i)}
         for i in range(MAX_CHANNELS)
@@ -93,12 +94,12 @@ class Decoder(srd.Decoder):
         ('phase', 'Phase'),
         ('increment', 'Increment'),
         ('count', 'Count'),
-        ('turns', 'Turns'),
+        ('turn', 'Turn'),
         ('interval', 'Interval'),
         ('average', 'Average'),
         ('rpm', 'Rate'),
     )
-    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))
 
     def __init__(self):
         self.reset()