summaryrefslogtreecommitdiff
path: root/decoders/lm75
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-11-14 21:55:09 +0100
committerBert Vermeulen <bert@biot.com>2013-11-15 22:05:54 +0100
commit0309c15a6990f57fbbb27d6a77957b1282163f06 (patch)
treeb66b202f731b4e0d7b48a64e29f9bd22d260a046 /decoders/lm75
parentbe465111b552c7c2a2262ac49758a30a8bf1b1d5 (diff)
downloadlibsigrokdecode-0309c15a6990f57fbbb27d6a77957b1282163f06.tar.gz
libsigrokdecode-0309c15a6990f57fbbb27d6a77957b1282163f06.zip
Drop outdated report: this should be handled by a frontend.
Diffstat (limited to 'decoders/lm75')
-rw-r--r--decoders/lm75/pd.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/decoders/lm75/pd.py b/decoders/lm75/pd.py
index 6bbc5d8..a41c27b 100644
--- a/decoders/lm75/pd.py
+++ b/decoders/lm75/pd.py
@@ -73,21 +73,11 @@ class Decoder(srd.Decoder):
self.state = 'IDLE'
self.reg = 0x00 # Currently selected register
self.databytes = []
- self.mintemp = 0
- self.maxtemp = 0
- self.avgvalues = []
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... ?
- avg = sum(self.avgvalues) / len(self.avgvalues)
- temperatures = (self.mintemp, self.maxtemp, avg)
- # TODO: Configurable report() output, e.g. for Kelvin.
- return 'Min/max/avg temperature: %f/%f/%f °C' % temperatures
-
def putx(self, data):
# Helper for annotations which span exactly one I2C packet.
self.put(self.ss, self.es, self.out_ann, data)
@@ -117,13 +107,6 @@ class Decoder(srd.Decoder):
s = 'Warning: The temperature register is read-only!'
self.putb([4, [s]])
- # Keep some statistics. Can be output in report(), for example.
- if celsius < self.mintemp:
- self.mintemp = celsius
- if celsius > self.maxtemp:
- self.maxtemp = celsius
- self.avgvalues.append(celsius)
-
def handle_temperature_reg(self, b, s, rw):
# Common helper for the temperature/T_HYST/T_OS registers.
if len(self.databytes) == 0: