Button initiated config service

Dependencies:   BLE_API_EddystoneConfigService_2 mbed nRF51822

Fork of BLE_EddystoneBeaconConfigService_3 by URIBeacon

Revision:
66:e2522ba2de62
Parent:
65:3b2f2a67840e
Child:
67:345bc62c748d
--- a/EddystoneConfigService.h	Wed Sep 23 15:56:27 2015 +0000
+++ b/EddystoneConfigService.h	Thu Sep 24 00:19:02 2015 +0000
@@ -236,12 +236,11 @@
     */
     void setDefaultURIFrameData(const char * uriIn, float  advPeriod = 1){
         DBG("Setting Default URI Data");
-//        // Set URL Frame
-//          EddystoneService::encodeURL(uriIn, defaultUriData, defaultUriDataLength); // encode URL to URL Formatting
-//        if (defaultUriDataLength > URI_DATA_MAX) {
-//            return;
-//        }
-        defaultUriDataLength = strlen(uriIn);
+        // Set URL Frame
+          EddystoneService::encodeURL(uriIn, defaultUriData, defaultUriDataLength); // encode URL to URL Formatting
+        if (defaultUriDataLength > URI_DATA_MAX) {
+            return;
+        }
         memcpy(defaultUriData,uriIn,URI_DATA_MAX);
         //defaultUriDataLength = strlen(uriIn);
         INFO("\t default URI = %s : %d", uriIn, defaultUriDataLength);
@@ -306,6 +305,7 @@
         // Save params to storage
         extern void saveURIBeaconConfigParams(const Params_t *paramsP); /* forward declaration; necessary to avoid a circular dependency. */
         saveURIBeaconConfigParams(&params);
+        INFO("Saved Params to Memory.")
         // Setup Eddystone Service 
         static EddystoneService eddyServ(ble,params.beaconPeriod,radioPowerLevels[params.txPowerMode]);
         // Set configured frames (TLM,UID,URI...etc)