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: APMDemoLight.cpp
- Revision:
- 168:1dc1f4e6a6cd
- Parent:
- 167:2529c18d0eb1
- Child:
- 169:5ba15f5f7f87
diff -r 2529c18d0eb1 -r 1dc1f4e6a6cd APMDemoLight.cpp --- a/APMDemoLight.cpp Wed Jul 16 17:29:00 2014 +0000 +++ b/APMDemoLight.cpp Thu Jul 17 17:08:54 2014 +0000 @@ -39,7 +39,7 @@ APMDemoLight *_apm_light_instance = NULL; // this interrupt routine is activated after a time delay set by dim value - extern "C" void triggerOn() + extern "C" void apm_light_triggerOn() { apm_light_SSR = 1; apm_light_led2 = 0; @@ -47,14 +47,14 @@ // this interrupt routine is activated by every AC line zero crossing // it is needed to synchronize the SCR turnon time delay to the AC line - extern "C" void dimmer() + extern "C" void apm_light_dimmer() { // turn off SSR at zero crossing apm_light_SSR = 0; // compute time delay using dim value and set timer interrupt // triggers SSR after a small post zero crossing time delay - apm_light_SSRtriggerOn.attach(&triggerOn,(1.001-_apm_light_instance->getDimValue())/(2*apm_light_powerlinefrequency)); + apm_light_SSRtriggerOn.attach(&apm_light_triggerOn,(1.001-_apm_light_instance->getDimValue())/(2*apm_light_powerlinefrequency)); apm_light_led2 = 1; } @@ -71,7 +71,7 @@ // ZeroCross configuration apm_light_zerocross.mode(PullNone); wait_ms(LIGHT_BLINK_WAIT_MS); - apm_light_zerocross.rise(&dimmer); + apm_light_zerocross.rise(&apm_light_dimmer); } // destructor