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 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: MBEDEndpoint.cpp
- Revision:
- 138:6159f1940b1d
- Parent:
- 115:7c8b958dfaa7
- Child:
- 139:1eef48a644a0
diff -r 6577dd23f6ed -r 6159f1940b1d MBEDEndpoint.cpp
--- a/MBEDEndpoint.cpp Mon Mar 17 22:05:30 2014 +0000
+++ b/MBEDEndpoint.cpp Tue Mar 18 21:53:24 2014 +0000
@@ -41,6 +41,7 @@
bool success = true;
for(int i=0;i<NUM_TRANSPORTS;++i) this->m_transports[i] = NULL;
this->m_error_handler = error_handler;
+ if (success) this->initPreferences();
if (success) this->initEndpointName();
if (success) this->logger()->turnLEDBlue();
#ifdef MAC_ADDRESS
@@ -74,6 +75,16 @@
// get the IOC <--> MBED resource map
MBEDToIOCResourceMap *MBEDEndpoint::getMap() { return this->m_map; }
+ // initialize our preferences
+ void MBEDEndpoint::initPreferences() {
+ if (this->m_preferences == NULL) {
+ this->m_preferences = new Preferences(this->logger());
+ }
+ }
+
+ // get our preferences
+ Preferences *MBEDEndpoint::preferences() { return this->m_preferences; }
+
// initialize the Lights
bool MBEDEndpoint::initializeLights() {
this->logger()->log("Initializing Lights...");