Core Base Classes for the Light Endpoints

Dependencies:   BufferedSerial

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more

Revision:
140:df0ca2c95982
Parent:
136:f433e40f8d65
Child:
141:26dca377597f
--- a/CommonDefinitions.h	Mon Mar 31 18:54:18 2014 +0000
+++ b/CommonDefinitions.h	Mon Mar 31 19:41:59 2014 +0000
@@ -48,10 +48,24 @@
 
 // Common Light Definition
 #define LIGHT_ON_STATE              "0"                             // initial state of each light in this endpoint
-#define LIGHT_DIM_STATE             "25"                            // initial dimming state of each light in this endpoint
-#define LIGHT_DEFAULT_STATE         1                               // ON by default
+#define LIGHT_DIM_STATE             "100"                           // initial dimming state of each light in this endpoint
 #define LIGHT_TYPE_STRING           "Light"                         // Type of Light (string)
 #define LIGHT_BLINK_WAIT_MS         1000                            // time between blinks (ms)
+#define LIGHT_DEFAULT_STATE         1                               // ON by default
+
+// Personalities may have unique default light states
+#ifdef LIGHT_PERSONALITY
+    #undef LIGHT_DEFAULT_STATE
+    #undef LIGHT_BLINK_WAIT_MS
+    #define LIGHT_DEFAULT_STATE     1                               // ON by default
+    #define LIGHT_BLINK_WAIT_MS     1000                            // time between blinks (ms)
+#endif
+#ifdef COPCAR_PERSONALITY
+    #undef LIGHT_DEFAULT_STATE
+    #undef LIGHT_BLINK_WAIT_MS
+    #define LIGHT_DEFAULT_STATE     0                               // OFF by default
+    #define LIGHT_BLINK_WAIT_MS     400                             // time between blinks (ms)
+#endif
 
 // Main Loop
 #define MAIN_LOOP_SLEEP             250                             // sleep time (ms) between main loop iterations