X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmidi%2Fpd.py;h=feb581c6684522c8d87a7fc449310403332976b3;hb=88567e4abe73a49acf9527aedeed42ee738c7976;hp=18c439f48ea695665de0472c82648dce60aa08ac;hpb=084758572e97ff9251da9b75c1f5295faf9621c7;p=libsigrokdecode.git diff --git a/decoders/midi/pd.py b/decoders/midi/pd.py index 18c439f..feb581c 100644 --- a/decoders/midi/pd.py +++ b/decoders/midi/pd.py @@ -2,7 +2,7 @@ ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2013-2016 Uwe Hermann -## Copyright (C) 2016 Chris Dreher +## Copyright (C) 2016 Chris Dreher ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## along with this program; if not, see . ## import sigrokdecode as srd @@ -26,7 +25,7 @@ RX = 0 TX = 1 class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'midi' name = 'MIDI' longname = 'Musical Instrument Digital Interface' @@ -45,6 +44,9 @@ class Decoder(srd.Decoder): ) def __init__(self): + self.reset() + + def reset(self): self.state = 'IDLE' self.status_byte = 0 self.explicit_status_byte = False