]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/mlx90614/mlx90614.py
srd: rename extra_probes to optional_probes in all PDs
[libsigrokdecode.git] / decoders / mlx90614 / mlx90614.py
index fa1621c2b8556a4a59e61559841a79b02fd9bc35..4cc39a358463a5acbc3aa8306b65d4e1e2096166 100644 (file)
@@ -35,7 +35,7 @@ class Decoder(srd.Decoder):
     inputs = ['i2c']
     outputs = ['mlx90614']
     probes = []
-    extra_probes = []
+    optional_probes = []
     options = {}
     annotations = [
         ['Celsius', 'Temperature in degrees Celsius'],
@@ -79,8 +79,8 @@ class Decoder(srd.Decoder):
             else:
                 kelvin = (self.data[0] | (self.data[1] << 8)) * 0.02
                 celsius = kelvin - 273.15
-                self.putx([0, ['Temperature: %d °C' % celsius]])
-                self.putx([1, ['Temperature: %d °K' % kelvin]])
+                self.putx([0, ['Temperature: %3.2f °C' % celsius]])
+                self.putx([1, ['Temperature: %3.2f °K' % kelvin]])
                 self.state = 'IGNORE START REPEAT'
                 self.data = []
         else: