X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmlx90614%2Fpd.py;h=c4a47c431b75f7d3b24bab3958cf0c010e37c4be;hp=1ee88d78509bad088f36254e1c4ab5b778beb350;hb=8915b34659332288aab38780d8f10d75c4c83e7f;hpb=24c74fd30fb161837c5f8b01baf3c0fe2dfa4ed5 diff --git a/decoders/mlx90614/pd.py b/decoders/mlx90614/pd.py index 1ee88d7..c4a47c4 100644 --- a/decoders/mlx90614/pd.py +++ b/decoders/mlx90614/pd.py @@ -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 ## @@ -36,14 +36,14 @@ class Decoder(srd.Decoder): options = {} annotations = [ ['Celsius', 'Temperature in degrees Celsius'], - ['Kelvin', 'Temperature in degrees Kelvin'], + ['Kelvin', 'Temperature in Kelvin'], ] def __init__(self, **kwargs): self.state = 'IGNORE START REPEAT' self.data = [] - def start(self, metadata): + def start(self): # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mlx90614') self.out_ann = self.add(srd.OUTPUT_ANN, 'mlx90614') @@ -79,9 +79,9 @@ class Decoder(srd.Decoder): kelvin = (self.data[0] | (self.data[1] << 8)) * 0.02 celsius = kelvin - 273.15 self.putx([0, ['Temperature: %3.2f °C' % celsius]]) - self.putx([1, ['Temperature: %3.2f °K' % kelvin]]) + self.putx([1, ['Temperature: %3.2f K' % kelvin]]) self.state = 'IGNORE START REPEAT' self.data = [] else: - raise Exception('Invalid state: %d' % self.state) + raise Exception('Invalid state: %s' % self.state)