X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fswim%2Fpd.py;h=fd43f418b36f2ec2c91ba679a789e438d0b3ea0b;hb=fb7a2f689cad8328a2b53101a968aef8e7a7b9e1;hp=462779bb103503784d43d653eb1f6f6d592b8d1d;hpb=f8cc803b1fa51036be16115bff809cdacecaffd5;p=libsigrokdecode.git diff --git a/decoders/swim/pd.py b/decoders/swim/pd.py index 462779b..fd43f41 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') }, ) @@ -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)