projects
/
libsigrokdecode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b30440
)
srd: lm75: Warn about temperature reg. being read-only.
author
Uwe Hermann
<uwe@hermann-uwe.de>
Wed, 4 Jul 2012 17:52:29 +0000
(19:52 +0200)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Thu, 5 Jul 2012 23:30:03 +0000
(
01:30
+0200)
decoders/lm75/lm75.py
patch
|
blob
|
history
diff --git
a/decoders/lm75/lm75.py
b/decoders/lm75/lm75.py
index ef3191b0d4a2636a2d00b275ab95cb94b256bcbd..338086a8b03913619db0ca84b1bc814f3aee6e9c 100644
(file)
--- 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