Final device thermometer error detection.

Sun, 28 Apr 2019 19:59:43 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 28 Apr 2019 19:59:43 +0200
changeset 589
230a502b75ec
parent 588
322a29000fd7
child 590
1ff1a95a7614
child 591
95cf33f8021f

Final device thermometer error detection.

thermferm/devices.c file | annotate | diff | comparison | revisions
--- a/thermferm/devices.c	Sun Apr 28 17:03:45 2019 +0200
+++ b/thermferm/devices.c	Sun Apr 28 19:59:43 2019 +0200
@@ -816,9 +816,8 @@
 #ifdef HAVE_WIRINGPI_H
 					piLock(LOCK_DEVICES);
 #endif
-					if (temp < -125000) {
-					    syslog(LOG_NOTICE, "sensor %s value error '%d`", device->address, temp);
-					    syslog(LOG_NOTICE, " %s", line1);
+					if (temp < -55000) {
+					    syslog(LOG_NOTICE, "sensor %s value error '%d` '%s`", device->address, temp, line1);
 					    device->present = DEVPRESENT_ERROR;
 					} else {
 					    device->value = temp;
@@ -829,9 +828,6 @@
 				    	piUnlock(LOCK_DEVICES);
 #endif
 				    }
-				    if (temp == 85000) {
-					syslog(LOG_NOTICE, "sensor %s value error '%d`", device->address, temp);
-				    }
 				} else {
 				    syslog(LOG_NOTICE, "sensor %s CRC error '%s`", device->address, line1);
 #ifdef HAVE_WIRINGPI_H

mercurial