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:
- 170:9e72f2d0f2b2
- Parent:
- 169:5ba15f5f7f87
- Child:
- 173:41c3cb81aba3
--- a/Light.cpp Thu Jul 17 19:50:57 2014 +0000 +++ b/Light.cpp Fri Jul 18 21:05:07 2014 +0000 @@ -192,27 +192,17 @@ this->m_current_state = 0; this->manageBlinkingThread(); #endif - -#ifdef APM_LIGHT_PERSONALITY +#ifdef LIGHT_PERSONALITY if (this->m_forward) this->on(); else this->off(); -#else - #ifdef LIGHT_PERSONALITY - if (this->m_forward) this->on(); else this->off(); - #endif -#endif - -#ifdef LIGHT_PERSONALITY 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 #ifdef APM_LIGHT_PERSONALITY if (APM_LIGHT_ENABLE && this->apmlight() != NULL) { if (this->m_forward) this->apmlight()->on(); else this->apmlight()->off(); } #endif - - // wait a bit... + 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); @@ -220,23 +210,14 @@ this->m_current_state = 0; this->manageBlinkingThread(); #endif - -#ifdef APM_LIGHT_PERSONALITY - if (this->m_forward) this->on(); else this->off(); -#else - #ifdef LIGHT_PERSONALITY - if (this->m_forward) this->on(); else this->off(); - #endif -#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 #ifdef APM_LIGHT_PERSONALITY if (APM_LIGHT_ENABLE && this->apmlight() != NULL) { if (this->m_forward) this->apmlight()->off(); else this->apmlight()->on(); } #endif - wait_ms(LIGHT_BLINK_WAIT_MS); }