thermferm/devices.c

changeset 340
5b49416eb116
parent 338
8e29d142d67d
child 341
cfc952a68d4a
--- a/thermferm/devices.c	Fri Mar 20 20:23:12 2015 +0100
+++ b/thermferm/devices.c	Fri Mar 20 22:22:18 2015 +0100
@@ -251,7 +251,7 @@
     struct dirent	*de;
     DIR			*fd;
     devices_list	*device, *ndev;
-    int			found, subdevices, i, rc = 0;
+    int			found, subdevices, ival, i, rc = 0;
     char		buf[40];
     uuid_t		uu;
 #ifdef HAVE_WIRINGPI_H
@@ -275,6 +275,8 @@
 		if (found == FALSE) {
 		    strncpy(buf, de->d_name, 2);
 		    buf[2] = '\0';
+		    sscanf(buf, "%02x", &ival);
+		    syslog(LOG_NOTICE, "Scan 1-wire %02x %d", ival, ival);
 		    subdevices = 1;
 		    if (strcmp(buf, (char *)"29") == 0)
 			subdevices = 8;

mercurial