]> sigrok.org Git - libsigrokdecode.git/commitdiff
srd: mlx90614: Show more exact temperature.
authorUwe Hermann <redacted>
Fri, 27 Jan 2012 17:47:27 +0000 (18:47 +0100)
committerUwe Hermann <redacted>
Fri, 27 Jan 2012 17:47:27 +0000 (18:47 +0100)
decoders/mlx90614/mlx90614.py

index fa1621c2b8556a4a59e61559841a79b02fd9bc35..235d70dc61b10b4d3fd83c9963eeb0c9e6205faf 100644 (file)
@@ -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: