Mercurial > ~darius > hgwebdir.cgi > epro
changeset 14:60ead9b5fc1b
Mark temperature as invalid when <-20C as per spec.
Shows up as -25C on the unit I have when the sensor is not connected.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 06 Dec 2021 11:26:20 +1030 |
parents | 4450cf739263 |
children | 08b61687b75f |
files | epro.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/epro.py Mon Dec 06 11:25:51 2021 +1030 +++ b/epro.py Mon Dec 06 11:26:20 2021 +1030 @@ -142,7 +142,7 @@ self.temp = (data[2] & 0x7f | (data[1] & 0x7f) << 7 | (data[0] & 0x3f) << 14) / 10.0 if data[2] & 0x40: self.temp *= -1 - if self.temp == -20: + if self.temp < -20: self.temp = None def __repr__(self):