]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/midi/pd.py
All PDs: Bump api_version to 2.
[libsigrokdecode.git] / decoders / midi / pd.py
index 7c4fa9afd794cfc6e0739e3398bddef6e46eb32b..b1f0053c912b86c44a374381ac183dedae82751c 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 *
 
@@ -27,7 +25,7 @@ RX = 0
 TX = 1
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'midi'
     name = 'MIDI'
     longname = 'Musical Instrument Digital Interface'
@@ -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,7 +46,6 @@ class Decoder(srd.Decoder):
         self.es_block = None
 
     def start(self):
-        # self.out_proto = self.register(srd.OUTPUT_PYTHON)
         self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):