Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027_Support C12832 StatusReporter LM75B MQTT-ansond c027_radios endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: MBEDEndpoint.cpp
- Revision:
- 143:fbdd4f74e1e9
- Parent:
- 141:0a09f2d03528
- Child:
- 148:b09187a0fa77
diff -r 664461ac5281 -r fbdd4f74e1e9 MBEDEndpoint.cpp
--- 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