X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Ftransitioncounter%2Ftransitioncounter.py;h=9506cee04fb46258e16d99e0d0c5e95d25ec00b3;hb=2dc6d41c64a8235308e61b4f9b509c7fecb2b502;hp=4156bfc3b8337a8bd2c1790b45d7d954b691f219;hpb=b77614bc977475102062ac5d1c8fe8e55349315a;p=libsigrokdecode.git diff --git a/decoders/transitioncounter/transitioncounter.py b/decoders/transitioncounter/transitioncounter.py index 4156bfc..9506cee 100644 --- a/decoders/transitioncounter/transitioncounter.py +++ b/decoders/transitioncounter/transitioncounter.py @@ -18,6 +18,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +# Transition counter protocol decoder + import sigrokdecode as srd class Decoder(srd.Decoder): @@ -26,7 +28,6 @@ class Decoder(srd.Decoder): name = 'Transition counter' longname = 'Pin transition counter' desc = 'Counts rising/falling edges in the signal.' - longdesc = '...' license = 'gplv2+' inputs = ['logic'] outputs = ['transitioncounts'] @@ -94,7 +95,8 @@ class Decoder(srd.Decoder): # TODO: How to only output something after the last chunk of data? outdata = [] for i in range(self.channels): - outdata += [[self.transitions[i], self.rising[i], self.falling[i]]] + outdata.append([self.transitions[i], self.rising[i], + self.falling[i]]) if outdata != []: # self.put(0, 0, self.out_proto, out_proto)