Button initiated config service

Dependencies:   BLE_API_EddystoneConfigService_2 mbed nRF51822

Fork of BLE_EddystoneBeaconConfigService_3 by URIBeacon

Revision:
44:0e27ee7800b8
Parent:
40:6f39aee31205
Child:
50:52a8b18d5bf1
--- a/main.cpp	Thu Sep 10 23:25:45 2015 +0000
+++ b/main.cpp	Fri Sep 11 19:38:12 2015 +0000
@@ -80,13 +80,20 @@
      * operation.
      */
     bool fetchedFromPersistentStorage = loadURIBeaconConfigParams(&params);
+    
+    // Set UID and TLM frame data
     EddystoneConfigService::UIDNamespaceID_t uidNamespaceID = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99}; // 10Byte Namespace UUID
     EddystoneConfigService::UIDInstanceID_t  uidInstanceID = {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}; // 6Byte Instance ID
     uint8_t tlmVersion = 0x00;
     
     /* Initialize a EddystoneBeaconConfig service providing config params, default URI, and power levels. */
     static EddystoneConfigService::PowerLevels_t defaultAdvPowerLevels = {-20, -4, 0, 10}; // Values for ADV packets related to firmware levels
-    EddystoneBeaconConfig = new EddystoneConfigService(ble, params, !fetchedFromPersistentStorage, defaultAdvPowerLevels, "http://mbed.org", &uidNamespaceID, &uidInstanceID, tlmVersion);
+    EddystoneBeaconConfig = new EddystoneConfigService(ble, params, defaultAdvPowerLevels);
+    EddystoneBeaconConfig->setDefaultURIFrameData("http://mbed.org",1000);
+    EddystoneBeaconConfig->setDefaultUIDFrameData(&uidNamespaceID, &uidInstanceID,10);
+    EddystoneBeaconConfig->setDefaultTLMFrameData(tlmVersion,1);
+    EddystoneBeaconConfig->start(!fetchedFromPersistentStorage);
+    
     if (!EddystoneBeaconConfig->initSuccessfully()) {
         error("failed to accommodate URI");
     }