diff -r ba340e00aab2 -r 9795a16de807 thermferm/devices.c --- a/thermferm/devices.c Sat Apr 27 15:36:16 2019 +0200 +++ b/thermferm/devices.c Sat Apr 27 20:47:26 2019 +0200 @@ -386,9 +386,9 @@ piUnlock(LOCK_DEVICES); #endif return 0; - } - } - } + } // if ((test_value != my_value) || (((int)now - (int)my_timestamp) >= 120)) + } // if (! strcmp(uuid, device->uuid)) + } // for (device = Config.devices; device; device = device->next) #ifdef HAVE_WIRINGPI_H piUnlock(LOCK_DEVICES); #endif @@ -729,8 +729,8 @@ syslog(LOG_NOTICE, "Thread my_devices_loop started"); #ifdef HAVE_WIRINGPI_H - if ((rc = piHiPri(10))) - syslog(LOG_NOTICE, "my_devices_loop: piHiPri(10) rc=%d", rc); + if ((rc = piHiPri(50))) + syslog(LOG_NOTICE, "my_devices_loop: piHiPri(50) rc=%d", rc); #endif /* @@ -798,6 +798,12 @@ piUnlock(LOCK_DEVICES); #endif } + if ((temp == 85000) || (temp < -125000)) { + syslog(LOG_NOTICE, "sensor %s value error '%d`", device->address, temp); + } + if (temp & 0xf800) { + syslog(LOG_NOTICE, "sensor %s sign bits error", device->address); + } } else { syslog(LOG_NOTICE, "sensor %s CRC error '%s`", device->address, line1); #ifdef HAVE_WIRINGPI_H