Mercurial > templog
diff py/sensor_ds18b20.py @ 175:33ed66a7ea0b
Ignore temp>80
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 25 Jul 2013 08:03:30 +0800 |
parents | 256505f98c4d |
children | 77c2a9caca3d |
line wrap: on
line diff
--- a/py/sensor_ds18b20.py Thu Jul 25 08:03:14 2013 +0800 +++ b/py/sensor_ds18b20.py Thu Jul 25 08:03:30 2013 +0800 @@ -58,6 +58,9 @@ D("no match") return None temp = int(match.groups(1)[0]) / 1000.0 + if temp > 80: + E("Problem reading sensor '%s': %f" % (s, temp)) + return None return temp except Exception, e: EX("Problem reading sensor '%s': %s" % (s, str(e)))