Loop runs

Wed, 23 Apr 2014 21:29:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 23 Apr 2014 21:29:37 +0200
changeset 10
5600a1789644
parent 9
91218bc77abc
child 11
f78f313b1d34

Loop runs

thermometers/main.c file | annotate | diff | comparison | revisions
--- a/thermometers/main.c	Wed Apr 23 21:17:44 2014 +0200
+++ b/thermometers/main.c	Wed Apr 23 21:29:37 2014 +0200
@@ -181,6 +181,7 @@
     int                 rc, keepalive = 60;
     unsigned int        max_inflight = 20;
     char                err[1024];
+    w1_therm		*tmp1, *old1;
 
     /*
      * Initialize mosquitto communication
@@ -274,10 +275,15 @@
 	    /*
 	     * Sleep just log enough to keep the system load low.
 	     */
-	    usleep(1);
+//	    usleep(1);
 	    /*
 	     * Here send our sensors values
 	     */
+	    for (tmp1 = Config.w1therms; tmp1; tmp1 = old1) {
+		old1 = tmp1->next;
+		fprintf(stdout, "s: %s\n", tmp1->name);
+	    }
+	    usleep(15000000);
 
 	    if (shutdown) {
 		/*

mercurial