thermferm/devices.c

changeset 351
d8c410c320db
parent 348
ffc4b8aa824f
child 354
5ff387f4d6b7
equal deleted inserted replaced
350:7283561977b1 351:d8c410c320db
286 test_value = (value == 0) ? 0 : 1; 286 test_value = (value == 0) ? 0 : 1;
287 } else { 287 } else {
288 test_value = value; 288 test_value = value;
289 } 289 }
290 290
291 if ((test_value != my_value) || (((int)now - (int)my_timestamp) > 120)) { 291 if ((test_value != my_value) || (((int)now - (int)my_timestamp) >= 120)) {
292 292
293 #ifdef HAVE_WIRINGPI_H 293 #ifdef HAVE_WIRINGPI_H
294 rc = 0; 294 rc = 0;
295 if ((device->type == DEVTYPE_RC433) && (device->gpiopin != -1) && (device->present == DEVPRESENT_YES)) { 295 if ((device->type == DEVTYPE_RC433) && (device->gpiopin != -1) && (device->present == DEVPRESENT_YES)) {
296 snprintf(buf, 39, "%s,%d", device->address, value ? 1:0); 296 snprintf(buf, 39, "%s,%d", device->address, value ? 1:0);

mercurial