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:
29:9a99f076129a
Parent:
9:90fadae5489a
Child:
32:56a11a9a35a2
--- a/MBEDLight.cpp	Fri Feb 28 03:10:53 2014 +0000
+++ b/MBEDLight.cpp	Fri Feb 28 04:56:16 2014 +0000
@@ -38,14 +38,15 @@
  }
  
  // turn ON 
- void MBEDLight::on() { _light_1 = 1; _light_2 = 1; }
+ void MBEDLight::on() { _light_1 = 1; _light_2 = 1; ((Light *)this)->on(); }
  
  // turn OFF 
- void MBEDLight::off() { _light_1 = 0; _light_2 = 0; }
+ void MBEDLight::off() { _light_1 = 0; _light_2 = 0; ((Light *)this)->off(); }
  
  // dim 
  void MBEDLight::dim(int value) { 
     float dim_val = (float)(value/100.0);
     _light_1.write(dim_val);
     _light_2.write(dim_val);
+    ((Light *)this)->dim(value);
  }
\ No newline at end of file