]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2001-03-15 09:13:22 by ltoetsch]
authorltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 15 Mar 2001 09:13:22 +0000 (09:13 +0000)
committerltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 15 Mar 2001 09:13:22 +0000 (09:13 +0000)
delay first exec for faster start

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@121 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

exec.c

diff --git a/exec.c b/exec.c
index c37fa5613db04aecb3b2b38b8f7fb71e11a13afa..354474535eb2db4173e4d0d60b7d4222d2eb6ceb 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1,4 +1,4 @@
-/* $Id: exec.c,v 1.5 2001/03/13 08:34:15 reinelt Exp $
+/* $Id: exec.c,v 1.6 2001/03/15 09:13:22 ltoetsch Exp $
  *
  * exec ('x*') functions
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: exec.c,v $
+ * Revision 1.6  2001/03/15 09:13:22  ltoetsch
+ * delay first exec for faster start
+ *
  * Revision 1.5  2001/03/13 08:34:15  reinelt
  *
  * corrected a off-by-one bug with sensors
@@ -77,7 +80,11 @@ int Exec(int index, char buff[EXEC_TXT_LEN], double *val)
     return -1;
   
   /* first time ? */
-  if (now[index] != 0) {
+  if (now[index] == 0) { /* not first time, to give faster a chance */
+    now[index] = -1;
+    return 0;
+  }
+  if (now[index] > 0) {
     /* delay in Ticks ? */
     sprintf(xn, "Tick_x%d", index);
     p = cfg_get(xn);