X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fswim%2Fpd.py;h=b48bb123e0395dab7e0bccc0648d8699c8714b39;hb=33687d6ed7b923662566e6a6f2761792bb087fb4;hp=462779bb103503784d43d653eb1f6f6d592b8d1d;hpb=f8cc803b1fa51036be16115bff809cdacecaffd5;p=libsigrokdecode.git diff --git a/decoders/swim/pd.py b/decoders/swim/pd.py index 462779b..b48bb12 100644 --- a/decoders/swim/pd.py +++ b/decoders/swim/pd.py @@ -14,8 +14,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 math @@ -33,6 +32,7 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['logic'] outputs = [] + tags = ['Debug/trace'] options = ( {'id': 'debug', 'desc': 'Debug', 'default': 'no', 'values': ('yes', 'no') }, ) @@ -55,7 +55,7 @@ class Decoder(srd.Decoder): ('address', 'Address'), ('data-write', 'Data write'), ('data-read', 'Data read'), - ('debug', 'Debug'), + ('debug-msg', 'Debug message'), ) annotation_rows = ( ('bits', 'Bits', (0,)), @@ -123,10 +123,7 @@ class Decoder(srd.Decoder): self.sync_reflen_min = math.floor(self.samplerate * 64 / self.HSI_max) self.sync_reflen_max = math.ceil(self.samplerate * 128 / (self.HSI_min / 2)) - if self.options['debug'] == 'yes': - self.debug = True - else: - self.debug = False + self.debug = True if self.options['debug'] == 'yes' else False # The SWIM entry sequence is 4 pulses at 2kHz followed by 4 at 1kHz. self.eseq_reflen = math.ceil(self.samplerate / 2048)