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:
84:4a993dd7c38b
Parent:
73:3e6478c7649f
Child:
87:e9d77e9f9eae
--- a/MBEDLight.cpp	Tue Mar 11 20:42:29 2014 +0000
+++ b/MBEDLight.cpp	Tue Mar 11 21:26:01 2014 +0000
@@ -20,11 +20,7 @@
  
  #include "LightDimmerAction.h"
  #include "LightSwitchAction.h"
- 
- // MBED Light
- extern DigitalOut led2;
- extern DigitalOut led3;
-  
+   
  // default constructor
  MBEDLight::MBEDLight(ErrorHandler *error_handler,Transport *transports[NUM_TRANSPORTS],int instance,void *endpoint) : Light(error_handler,transports,instance,endpoint) {
  }
@@ -34,10 +30,10 @@
  }
  
  // turn ON 
- void MBEDLight::on() { led2 = 1; led3 = 1; Light::on(); this->logger()->dimRGB(1.0); }
+ void MBEDLight::on() { this->logger()->led2On(); this->logger()->led3On(); Light::on(); this->logger()->dimRGB(1.0); }
  
  // turn OFF 
- void MBEDLight::off() { led2 = 0; led3 = 0; Light::off(); this->logger()->dimRGB(1.0); }
+ void MBEDLight::off() { this->logger()->led2Off(); this->logger()->led3Off(); Light::off(); this->logger()->dimRGB(1.0); }
  
  // dim 
  void MBEDLight::dim(int value) {