diff tempctrl.c @ 43:51e7458d2e76

Init lastdata same as lastheat/coolon/off otherwise we won't handle thing properly early on (ie if now < lastdata/lastheat/coolon/off)
author darius@inchoate.localdomain
date Sun, 06 Jul 2008 22:42:32 +0930
parents 97ae82023d5b
children f219538d6ea7
line wrap: on
line diff
--- a/tempctrl.c	Sun Jul 06 22:28:21 2008 +0930
+++ b/tempctrl.c	Sun Jul 06 22:42:32 2008 +0930
@@ -172,7 +172,7 @@
 tempctrl_update(void) {
     /* State variables */
     static int32_t	checktime = 0;		// Time of next check
-    static int32_t	lastdata = 0;		// Last time we got data
+    static int32_t	lastdata = -100000;	// Last time we got data
 
     static int16_t	fermenter_temp = 0;	// Fermenter temperature
     static int16_t	fridge_temp = 0;	// Fridge temperature