Mercurial > templog
changeset 175:33ed66a7ea0b
Ignore temp>80
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 25 Jul 2013 08:03:30 +0800 |
parents | c49d87bb81b9 |
children | ccebadce4619 |
files | py/sensor_ds18b20.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
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)))