]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/edid/pd.py
dmx512: Use a nicer 'dmx' pin name variable.
[libsigrokdecode.git] / decoders / edid / pd.py
index 7c5f19c4973002fe113f7736a68d1e8f1cfdf53b..389fbda9f48a4cdbf9196428d86533e6adfad673 100644 (file)
@@ -85,8 +85,12 @@ class Decoder(srd.Decoder):
         ('fields', 'EDID structure fields'),
         ('sections', 'EDID structure sections'),
     )
+    annotation_rows = (
+        ('sections', 'Sections', (1,)),
+        ('fields', 'Fields', (0,)),
+    )
 
-    def __init__(self, **kwargs):
+    def __init__(self):
         self.state = None
         # Received data items, used as an index into samplenum/data
         self.cnt = 0
@@ -136,10 +140,10 @@ class Decoder(srd.Decoder):
                         [ANN_SECTIONS, ['EDID Version']])
                 self.put(self.sn[OFF_VERSION][0], self.sn[OFF_VERSION][1],
                         self.out_ann, [ANN_FIELDS,
-                            ["Version %d" % self.cache[-2]]])
+                            ['Version %d' % self.cache[-2]]])
                 self.put(self.sn[OFF_VERSION+1][0], self.sn[OFF_VERSION+1][1],
                         self.out_ann, [ANN_FIELDS,
-                            [ "Revision %d" % self.cache[-1]]])
+                            ['Revision %d' % self.cache[-1]]])
             elif self.cnt == OFF_CHROM:
                 self.put(self.sn[OFF_BASIC][0], es, self.out_ann,
                         [ANN_SECTIONS, ['Basic display']])
@@ -329,7 +333,7 @@ class Decoder(srd.Decoder):
                     modestr += est_modes[i] + ', '
         if modestr:
             self.ann_field(offset, offset+2,
-                           'Supported establised modes: %s' % modestr[:-2])
+                           'Supported established modes: %s' % modestr[:-2])
 
     def decode_std_timing(self, offset):
         modestr = ''