Button initiated config service

Dependencies:   BLE_API_EddystoneConfigService_2 mbed nRF51822

Fork of BLE_EddystoneBeaconConfigService_3 by URIBeacon

Revision:
63:2478203aa555
Parent:
60:e9d8348e7397
Child:
64:6484b9e3aac0
--- a/EddystoneConfigService.h	Fri Sep 18 04:55:58 2015 +0000
+++ b/EddystoneConfigService.h	Mon Sep 21 16:40:02 2015 +0000
@@ -99,17 +99,17 @@
         // TLM Frame Data
         uint8_t       tlmVersion;     // version of TLM packet
         bool          tlmEnabled;
-        uint8_t       tlmBeaconPeriod; // how often to broadcat TLM frame, in minutes.  
+        float       tlmBeaconPeriod; // how often to broadcat TLM frame, in S
         // URI Frame Data
         uint8_t       uriDataLength;
         UriData_t     uriData;
         bool          uriEnabled;
-        uint8_t       uriBeaconPeriod; // how often to broadcast URIFrame, in # of adv frames
+        float       uriBeaconPeriod; // how often to broadcast URIFrame, in S
         // UID Frame Data
         UIDNamespaceID_t uidNamespaceID; // UUID type, Namespace ID, 10B
         UIDInstanceID_t  uidInstanceID;  // UUID type, Instance ID,  6B
         bool          uidEnabled;
-        uint8_t       uidBeaconPeriod;   // how often to broadcast UID Frame, in # of adv frames
+        float       uidBeaconPeriod;   // how often to broadcast UID Frame, in S
     };
 
     /**
@@ -214,14 +214,14 @@
     * @param[in] advPeriodInMin how long between TLM frames being advertised, this is measured in minutes.
     *
     */
-    void setDefaultTLMFrameData(uint8_t tlmVersionIn = 0, uint32_t advPeriodInMin = 1){
-        DBG("Setting Default TLM Data, version = %d, advPeriodInMind= %d",tlmVersionIn,advPeriodInMin);
+    void setDefaultTLMFrameData(uint8_t tlmVersionIn = 0, float advPeriodInSec = 60){
+        DBG("Setting Default TLM Data, version = %d, advPeriodInMind= %f",tlmVersionIn,advPeriodInSec);
         defaultTlmVersion = tlmVersionIn;
         TlmBatteryVoltage = 0;
         TlmBeaconTemp = 0;
         TlmPduCount = 0;
         TlmTimeSinceBoot = 0;
-        defaultTlmAdvPeriod = advPeriodInMin;
+        defaultTlmAdvPeriod = advPeriodInSec;
         tlmIsSet = true; // flag to add this to eddystone service when config is done
     
     }
@@ -233,7 +233,7 @@
     * @param[in] advPeriod  how long to advertise the url for, measured in number of ADV frames.
     *
     */
-    void setDefaultURIFrameData(const char * uriIn,uint32_t  advPeriod = 1000){
+    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
@@ -257,7 +257,7 @@
     * @param[in] advPeriod   how long to advertise the URL for, measured in the number of adv frames.
     *
     */
-    void setDefaultUIDFrameData(UIDNamespaceID_t *namespaceID, UIDInstanceID_t *instanceID, uint32_t advPeriod = 10){
+    void setDefaultUIDFrameData(UIDNamespaceID_t *namespaceID, UIDInstanceID_t *instanceID, float advPeriod = 10){
         //Set UID frame
         DBG("Setting default UID Data");
         memcpy(defaultUidNamespaceID, namespaceID, UID_NAMESPACEID_SIZE);
@@ -511,7 +511,7 @@
 //UID Default value that is restored on reset
     UIDNamespaceID_t    defaultUidNamespaceID;
     UIDInstanceID_t     defaultUidInstanceID;
-    uint32_t            defaultUidAdvPeriod;
+    float            defaultUidAdvPeriod;
     int8_t              defaultUidPower;
     uint16_t            uidRFU;
     bool                uidIsSet;
@@ -520,12 +520,12 @@
     uint8_t             defaultUriDataLength;
     UriData_t           defaultUriData;
     int8_t              defaultUrlPower;
-    uint32_t            defaultUriAdvPeriod;
+    float            defaultUriAdvPeriod;
     bool                urlIsSet;
 
 //TLM  Default value that is restored on reset
     uint8_t             defaultTlmVersion;
-    uint32_t            defaultTlmAdvPeriod;
+    float            defaultTlmAdvPeriod;
     volatile uint16_t   TlmBatteryVoltage;
     volatile uint16_t   TlmBeaconTemp;
     volatile uint32_t   TlmPduCount;