MBED_DEMOS / Mbed 2 deprecated mbed_mqtt_endpoint_ublox_cellular

Dependencies:   C027_Support C12832 StatusReporter LM75B MQTT-ansond c027_radios endpoint_core endpoint_mqtt mbed-rtos mbed

Revision:
143:fbdd4f74e1e9
Parent:
141:0a09f2d03528
Child:
148:b09187a0fa77
--- a/MBEDEndpoint.cpp	Wed Mar 19 04:13:20 2014 +0000
+++ b/MBEDEndpoint.cpp	Wed Mar 19 04:49:44 2014 +0000
@@ -149,8 +149,9 @@
  
  // Initialize the Endpoint Name - will be the first Light resource name (and there must be one...)
  void MBEDEndpoint::initEndpointName() {
+     int index = this->preferences()->getIntPreference("endpoint_id",LIGHT_NAME_INDEX);
      memset(this->m_endpoint_name,0,LIGHT_NAME_LEN+1);
-     sprintf(this->m_endpoint_name,LIGHT_NAME,1);
+     sprintf(this->m_endpoint_name,LIGHT_NAME,index);
  }
  
  // get our endpoint name