thermferm/devices.c

changeset 348
ffc4b8aa824f
parent 347
0ab5c3fd7c77
child 351
d8c410c320db
equal deleted inserted replaced
347:0ab5c3fd7c77 348:ffc4b8aa824f
337 } else { 337 } else {
338 output = 0xff; 338 output = 0xff;
339 } 339 }
340 340
341 if ((write_w1(device->address, (char *)"output", output)) == 0) { 341 if ((write_w1(device->address, (char *)"output", output)) == 0) {
342 syslog(LOG_NOTICE, "DS2413 PIO%c value=%d", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1); 342 syslog(LOG_NOTICE, "DS2413 PIO%c value=%d (%s)", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment);
343 if (debug) 343 if (debug)
344 fprintf(stdout, "DS2413 PIO%c value=%d\n", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1); 344 fprintf(stdout, "DS2413 PIO%c value=%d (%s)\n", (device->subdevice == 0) ? 'A' : 'B', (value == 0) ? 0 : 1, device->comment);
345 device->value = (value == 0) ? 0 : 1; 345 device->value = (value == 0) ? 0 : 1;
346 device->timestamp = time(NULL); 346 device->timestamp = time(NULL);
347 } 347 }
348 } 348 }
349 } 349 }

mercurial