]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/lm75/pd.py
Use the new Decoder.register() API
[libsigrokdecode.git] / decoders / lm75 / pd.py
index 9d2f0ab242bb48bcbfbfb1dfe9e696b3b04f6ced..6bbc5d8765ddca69dc9166129478dbb8bfa9fa36 100644 (file)
@@ -1,5 +1,5 @@
 ##
-## This file is part of the sigrok project.
+## This file is part of the libsigrokdecode project.
 ##
 ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
 ##
@@ -46,7 +46,7 @@ class Decoder(srd.Decoder):
     id = 'lm75'
     name = 'LM75'
     longname = 'National LM75'
-    desc = 'National LM75 (and compatibles) temperature sensor protocol.'
+    desc = 'National LM75 (and compatibles) temperature sensor.'
     license = 'gplv2+'
     inputs = ['i2c']
     outputs = ['lm75']
@@ -77,9 +77,9 @@ class Decoder(srd.Decoder):
         self.maxtemp = 0
         self.avgvalues = []
 
-    def start(self, metadata):
-        # self.out_proto = self.add(srd.OUTPUT_PROTO, 'lm75')
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'lm75')
+    def start(self):
+        # self.out_proto = self.register(srd.OUTPUT_PYTHON)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def report(self):
         # TODO: print() or self.put() or return xyz, or... ?