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:
146:8c05a119d9d4
Parent:
144:e4d24c2c8f18
Child:
160:24337c83dd1d
--- a/Light.cpp	Wed Apr 02 01:08:48 2014 +0000
+++ b/Light.cpp	Wed Apr 02 01:50:02 2014 +0000
@@ -158,14 +158,32 @@
  // Blink 
  void Light::blinkLight() { 
     this->m_is_blinking = true;
+#ifdef COPCAR_PERSONALITY
+    if (EXT_LED_ENABLE && this->extled() != NULL) { ((CopCarLEDFlasher *)this->extled())->on(); }
+    wait_ms(125);
+    if (EXT_LED_ENABLE && this->extled() != NULL) { ((CopCarLEDFlasher *)this->extled())->off(); }
+    this->m_current_state = 0; 
+    this->manageBlinkingThread();
+#endif
+#ifdef LIGHT_PERSONALITY
     if (this->m_forward) this->on(); else this->off();
     if (PL_ENABLE && this->pl() != NULL) { if (this->m_forward) this->pl()->on(); else this->pl()->off(); }
     if (EXT_LED_ENABLE && this->extled() != NULL) { if (this->m_forward) this->extled()->on(); else this->extled()->off(); }
+#endif
     wait_ms(LIGHT_BLINK_WAIT_MS);
     this->m_is_blinking = true;
+#ifdef COPCAR_PERSONALITY
+    if (EXT_LED_ENABLE && this->extled() != NULL) { ((CopCarLEDFlasher *)this->extled())->on(); }
+    wait_ms(125);
+    if (EXT_LED_ENABLE && this->extled() != NULL) { ((CopCarLEDFlasher *)this->extled())->off(); }
+    this->m_current_state = 0; 
+    this->manageBlinkingThread();
+#endif
+#ifdef LIGHT_PERSONALITY
     if (this->m_forward) this->off(); else this->on();
     if (PL_ENABLE && this->pl() != NULL) { if (this->m_forward) this->pl()->off(); else this->pl()->on(); }
     if (EXT_LED_ENABLE && this->extled() != NULL) { if (this->m_forward) this->extled()->off(); else this->extled()->on(); }
+#endif
     wait_ms(LIGHT_BLINK_WAIT_MS);
   }