]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/edid/pd.py
decoders: Fix incorrect 'outputs' fields.
[libsigrokdecode.git] / decoders / edid / pd.py
index 91db4b871d5b23dfbe744793f339c99c63204697..2d7460ce434e5163f014e9f1c8497cda68cb15f9 100644 (file)
@@ -80,7 +80,8 @@ class Decoder(srd.Decoder):
     desc = 'Data structure describing display device capabilities.'
     license = 'gplv3+'
     inputs = ['i2c']
-    outputs = ['edid']
+    outputs = []
+    tags = ['Display', 'Memory', 'PC']
     annotations = (
         ('fields', 'EDID structure fields'),
         ('sections', 'EDID structure sections'),
@@ -267,10 +268,7 @@ class Decoder(srd.Decoder):
 
     def ann_field(self, start, end, annotation):
         annotation = annotation if isinstance(annotation, list) else [annotation]
-        if self.extension:
-            sn = self.ext_sn[self.extension - 1]
-        else:
-            sn = self.sn
+        sn = self.ext_sn[self.extension - 1] if self.extension else self.sn
         self.put(sn[start][0], sn[end][1],
                  self.out_ann, [ANN_FIELDS, annotation])
 
@@ -525,10 +523,7 @@ class Decoder(srd.Decoder):
         self.ann_field(offset+3, offset+3, "Tag: {0:X}".format(tag))
         self.ann_field(offset+4, offset+4, "Flag")
 
-        if self.extension:
-            sn = self.ext_sn[extension - 1]
-        else:
-            sn = self.sn
+        sn = self.ext_sn[self.extension - 1] if self.extension else self.sn
 
         if tag == 0xff:
             # Monitor serial number