# HG changeset patch # User Michiel Broek # Date 1426886538 -3600 # Node ID 5b49416eb11628e08b2bd7d552479f5ad91e8c69 # Parent 16203280eea2329ba7c22757b973edd920539d6d Experimental idea diff -r 16203280eea2 -r 5b49416eb116 thermferm/devices.c --- 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;