stateManager.h
changeset 6 c4ed0b3eae5a
parent 5 e1589f6e6ed9
child 7 11b21f24fac9
--- a/stateManager.h	Mon May 17 15:48:49 2010 +0100
+++ b/stateManager.h	Tue May 18 19:19:03 2010 +0100
@@ -17,11 +17,17 @@
 #define UP         9        // Running normally - dont sleep
 #define GREEN   1160        // Voltage level for normal running
 #define AMBER   1139        // Voltage level at which we must go asleep
+#define STBYLONG_TIME 240
+#define STBYSHORT_TIME 120
+#define OVERRIDE_TIME 360
+//#define STBYLONG_TIME 10800
+//#define STBYSHORT_TIME 1800
+//#define OVERRIDE_TIME 1800
 #define SLEEPTIMESTART "22:00"    // Time to start sleeping
 #define SLEEPTIMEEND   "06:00"    // Time to end sleeping
-#define BOOTFLAG_MAN_RESTART    'X'
-#define BOOTFLAG_MAN_OVERRIDE   'N'
-#define BOOTFLAG_NORMAL         'S'
+#define BOOTFLAG_MAN_RESTART    "X"
+#define BOOTFLAG_MAN_OVERRIDE   "N"
+#define BOOTFLAG_NORMAL         "S"
 
 void display_generic_properties(CPhidgetHandle phid);
 void display_properties(CPhidgetTextLCDHandle phid);
@@ -29,7 +35,7 @@
 void getAmps(CPhidgetInterfaceKitHandle IFK, int ampIndex, int *Amps);
 void getLux(CPhidgetInterfaceKitHandle IFK, int luxIndex, int *Lux);
 void updateSnapshotfile(char *SNAPSHOTFILE, int newState, int Voltage, int Amps, int Lux);
-void updateLogfile(FILE *filelog, int Voltage, int Amps, int Lux);
+void updateLogfile(FILE *filelog, int Voltage, int Amps, int Lux, int state);
 void getTimeString (int wakeTime, char *wakeTimeStr);
 void getnewState(int Voltage, char *bootflag, int *newState);
 void closeCPhidget(CPhidgetHandle handle);