Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: Light.cpp
- Revision:
- 173:41c3cb81aba3
- Parent:
- 170:9e72f2d0f2b2
- Child:
- 180:eb43d5cd0ed7
--- a/Light.cpp Thu Jul 31 15:31:01 2014 +0000 +++ b/Light.cpp Fri Aug 01 12:15:46 2014 +0000 @@ -140,7 +140,12 @@ // initiate blinking void Light::blink() { this->m_last_state = this->m_current_state; +#ifdef APM_COPCAR_ENABLE + // just enable the external pin to go high + if (EXT_LED_ENABLE && this->extled() != NULL) { ((CopCarLEDFlasher *)this->extled())->on(); } +#else this->startBlinkingThread(); +#endif } // manage the blinking thread @@ -155,6 +160,9 @@ if (this->m_last_state == 1) this->on(); if (this->m_last_state == 0) this->off(); this->m_current_state = this->m_last_state; +#ifdef APM_COPCAR_ENABLE + if (EXT_LED_ENABLE && this->extled() != NULL) { ((CopCarLEDFlasher *)this->extled())->off(); } +#endif } // start blinking thread