]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/mlx90614/pd.py
sdcard_spi: Use proper annotation classes.
[libsigrokdecode.git] / decoders / mlx90614 / pd.py
index 3cd2dcbee8772918982565f8e3ed6a4aa8f3f57b..14451c86dd462581b1a144a0c3881431682e0ef4 100644 (file)
@@ -18,8 +18,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# Melexis MLX90614 Infrared Thermometer protocol decoder
-
 import sigrokdecode as srd
 
 class Decoder(srd.Decoder):
@@ -35,20 +33,17 @@ class Decoder(srd.Decoder):
     optional_probes = []
     options = {}
     annotations = [
-        ['Celsius', 'Temperature in degrees Celsius'],
-        ['Kelvin', 'Temperature in Kelvin'],
+        ['celsius', 'Temperature in degrees Celsius'],
+        ['kelvin', 'Temperature in Kelvin'],
     ]
 
     def __init__(self, **kwargs):
         self.state = 'IGNORE START REPEAT'
         self.data = []
 
-    def start(self, metadata):
-        # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mlx90614')
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'mlx90614')
-
-    def report(self):
-        pass
+    def start(self):
+        # self.out_python = self.register(srd.OUTPUT_PYTHON)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
         self.put(self.ss, self.es, self.out_ann, data)