Button initiated config service

Dependencies:   BLE_API_EddystoneConfigService_2 mbed nRF51822

Fork of BLE_EddystoneBeaconConfigService_3 by URIBeacon

Revision:
55:3818a9fa827d
Parent:
54:4418b24f2506
Child:
59:a89c00180058
diff -r 4418b24f2506 -r 3818a9fa827d main.cpp
--- a/main.cpp	Wed Sep 16 17:29:51 2015 +0000
+++ b/main.cpp	Thu Sep 17 20:23:46 2015 +0000
@@ -34,6 +34,7 @@
  * The following help with this switch.
  */
 static const int CONFIG_ADVERTISEMENT_TIMEOUT_SECONDS = 30;  // Duration after power-on that config service is available.
+
 Ticker configAdvertisementTimeout;
 
 /**
@@ -84,8 +85,9 @@
     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, defaultAdvPowerLevels);
+    static EddystoneConfigService::PowerLevels_t defaultAdvPowerLevels = {-20, -4, 0, 10}; // Values for ADV packets related to firmware levels, calibrated based on measured values at 1m
+    static EddystoneConfigService::PowerLevels_t radioPowerLevels =      {-20, -4, 0, 10}; // Values for radio power levels, provided by manufacturer.
+    EddystoneBeaconConfig = new EddystoneConfigService(ble, params, defaultAdvPowerLevels, radioPowerLevels);
     EddystoneBeaconConfig->setDefaultURIFrameData("http://mbed.org",1000);
     EddystoneBeaconConfig->setDefaultUIDFrameData(&uidNamespaceID, &uidInstanceID,10);
     EddystoneBeaconConfig->setDefaultTLMFrameData(tlmVersion,1);