]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/mlx90614/pd.py
uart: Fix a bug in the output for stacked PDs.
[libsigrokdecode.git] / decoders / mlx90614 / pd.py
index 4600754dffe16b550508d49255db8314c143d464..0a3abbaf62daf1aef006cdc285b89bb131b96f86 100644 (file)
@@ -21,7 +21,7 @@
 import sigrokdecode as srd
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'mlx90614'
     name = 'MLX90614'
     longname = 'Melexis MLX90614'
@@ -34,7 +34,7 @@ class Decoder(srd.Decoder):
         ('kelvin', 'Temperature in Kelvin'),
     )
 
-    def __init__(self, **kwargs):
+    def __init__(self):
         self.state = 'IGNORE START REPEAT'
         self.data = []
 
@@ -73,6 +73,3 @@ class Decoder(srd.Decoder):
                 self.putx([1, ['Temperature: %3.2f K' % kelvin]])
                 self.state = 'IGNORE START REPEAT'
                 self.data = []
-        else:
-            raise Exception('Invalid state: %s' % self.state)
-