thermferm/thermferm.c

changeset 158
f1b7e2ef90be
parent 156
5fb74d89f571
child 160
87bfa951ffc2
--- a/thermferm/thermferm.c	Thu Jul 31 13:43:09 2014 +0200
+++ b/thermferm/thermferm.c	Thu Jul 31 17:44:50 2014 +0200
@@ -24,6 +24,7 @@
 #include "logger.h"
 #include "rdconfig.h"
 #include "sensors.h"
+#include "devices.c"
 #include "server.h"
 #include "thermferm.h"
 #include "lcd-pcf8574.h"
@@ -245,6 +246,14 @@
 	return 1;
     }
 
+    rc = devices_detect();
+    if (rc) {
+	syslog(LOG_NOTICE, "Detected %d new devices", rc);
+	if (debug)
+	    fprintf(stdout, "Detected %d new devices\n", rc);
+	wrconfig();
+    }
+
 #ifdef HAVE_WIRINGPI_H
     rc = piThreadCreate(my_sensors_loop);
 #else

mercurial