]> sigrok.org Git - libsigrokdecode.git/blobdiff - scripts/transitioncounter.py
Various Python decoder infrastructure improvements.
[libsigrokdecode.git] / scripts / transitioncounter.py
index a9e83f774b18d0d00ce01c460d9829b18e78e7c8..4064d2f5debc71da5dd732d3afd6f20d418a09c6 100644 (file)
@@ -18,7 +18,7 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-def sigrokdecode_count_transitions(inbuf):
+def decode(inbuf):
        """Counts the low->high and high->low transitions in the specified
           channel(s) of the signal."""
 
@@ -81,8 +81,8 @@ def register():
        return {
                'id': 'transitioncounter',
                'name': 'Transition counter',
-               'description': 'TODO',
-               'function': 'sigrokdecode_count_transitions',
+               'desc': 'TODO',
+               'func': 'decode',
                'inputformats': ['raw'],
                'signalnames': {}, # FIXME
                'outputformats': ['transitioncounts'],
@@ -91,7 +91,7 @@ def register():
 # Use psyco (if available) as it results in huge performance improvements.
 try:
        import psyco
-       psyco.bind(sigrokdecode_count_transitions)
+       psyco.bind(decode)
 except ImportError:
        pass