X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmidi%2Fpd.py;h=1a553ead10df93fbf3bc0a1cde9d29e472def1aa;hp=371bcd5a0f3e053e487eaf496e5301bdc56aa3f9;hb=c761524941fcb2237ceb65082e504e5e48e62a05;hpb=f2a5df42ea41e6c4370d4efa1a27ab942ba1ddff diff --git a/decoders/midi/pd.py b/decoders/midi/pd.py index 371bcd5..1a553ea 100644 --- a/decoders/midi/pd.py +++ b/decoders/midi/pd.py @@ -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)