]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/midi/pd.py
All PDs: Drop some unneeded comments.
[libsigrokdecode.git] / decoders / midi / pd.py
index 371bcd5a0f3e053e487eaf496e5301bdc56aa3f9..1a553ead10df93fbf3bc0a1cde9d29e472def1aa 100644 (file)
@@ -18,8 +18,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# MIDI protocol decoder
-
 import sigrokdecode as srd
 from .lists import *
 
@@ -35,13 +33,9 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['uart']
     outputs = ['midi']
-    probes = []
-    optional_probes = []
-    options = {}
-    annotations = [
-        ['Text (verbose)', 'Human-readable text (verbose)'],
-        # ['Text', 'Human-readable text'],
-    ]
+    annotations = (
+        ('text-verbose', 'Human-readable text (verbose)'),
+    )
 
     def __init__(self, **kwargs):
         self.cmd = []
@@ -52,11 +46,7 @@ class Decoder(srd.Decoder):
         self.es_block = None
 
     def start(self):
-        # self.out_proto = self.add(srd.OUTPUT_PYTHON, 'midi')
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'midi')
-
-    def report(self):
-        pass
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
         self.put(self.ss_block, self.es_block, self.out_ann, data)