thermferm/devices.c

changeset 591
95cf33f8021f
parent 589
230a502b75ec
child 596
e3d3cde32847
equal deleted inserted replaced
589:230a502b75ec 591:95cf33f8021f
348 output = 0xff; 348 output = 0xff;
349 } 349 }
350 350
351 if ((write_w1(device->address, (char *)"output", output)) == 0) { 351 if ((write_w1(device->address, (char *)"output", output)) == 0) {
352 syslog(LOG_NOTICE, "DS2413 PIO%c value=%d (%s)", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment); 352 syslog(LOG_NOTICE, "DS2413 PIO%c value=%d (%s)", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment);
353 if (debug)
354 fprintf(stdout, "DS2413 PIO%c value=%d (%s)\n", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment);
355 device->value = (value == 0) ? 0 : 1; 353 device->value = (value == 0) ? 0 : 1;
356 device->timestamp = time(NULL); 354 device->timestamp = time(NULL);
357 } 355 }
358 } 356 }
359 } 357 }

mercurial