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); |