summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
Diffstat (limited to 'decoders')
-rw-r--r--decoders/lm75/lm75.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/decoders/lm75/lm75.py b/decoders/lm75/lm75.py
index ef3191b..338086a 100644
--- a/decoders/lm75/lm75.py
+++ b/decoders/lm75/lm75.py
@@ -109,6 +109,11 @@ class Decoder(srd.Decoder):
self.putb([0, ['%s: %.1f °C' % (s, celsius)]])
self.putb([1, ['%s: %.1f °K' % (s, kelvin)]])
+ # Warn about the temperature register (0x00) being read-only.
+ if s == 'Temperature' and rw == 'WRITE':
+ 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