243 if (lockprog((char *)"thermferm")) { |
244 if (lockprog((char *)"thermferm")) { |
244 syslog(LOG_NOTICE, "Can't lock"); |
245 syslog(LOG_NOTICE, "Can't lock"); |
245 return 1; |
246 return 1; |
246 } |
247 } |
247 |
248 |
|
249 rc = devices_detect(); |
|
250 if (rc) { |
|
251 syslog(LOG_NOTICE, "Detected %d new devices", rc); |
|
252 if (debug) |
|
253 fprintf(stdout, "Detected %d new devices\n", rc); |
|
254 wrconfig(); |
|
255 } |
|
256 |
248 #ifdef HAVE_WIRINGPI_H |
257 #ifdef HAVE_WIRINGPI_H |
249 rc = piThreadCreate(my_sensors_loop); |
258 rc = piThreadCreate(my_sensors_loop); |
250 #else |
259 #else |
251 rc = pthread_create(&threads[t], NULL, my_sensors_loop, (void *)t ); |
260 rc = pthread_create(&threads[t], NULL, my_sensors_loop, (void *)t ); |
252 #endif |
261 #endif |