From bc2bd89f835afce5a6ef1e33f0573ccfb8f72afa Mon Sep 17 00:00:00 2001 From: Donatien Garnier Date: Fri, 4 Jan 2019 09:50:24 +0000 Subject: [PATCH 1/2] Fixes for features/FEATURE_BLE/ble/services/EddystoneService.h --- .../FEATURE_BLE/ble/services/EddystoneService.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/features/FEATURE_BLE/ble/services/EddystoneService.h b/features/FEATURE_BLE/ble/services/EddystoneService.h index 7a520880e6..4a42a98548 100644 --- a/features/FEATURE_BLE/ble/services/EddystoneService.h +++ b/features/FEATURE_BLE/ble/services/EddystoneService.h @@ -21,6 +21,10 @@ #include "ble/BLE.h" #include "CircularBuffer.h" +#include "Timer.h" +#include "Ticker.h" +#include "Timeout.h" + static const uint8_t BEACON_EDDYSTONE[] = {0xAA, 0xFE}; //Debug is disabled by default @@ -75,7 +79,7 @@ public: void (*frames[EDDYSTONE_MAX_FRAMETYPE])(uint8_t *, uint32_t); static const int URI_DATA_MAX = 18; typedef uint8_t UriData_t[URI_DATA_MAX]; - CircularBuffer overflow; + mbed::CircularBuffer overflow; // UID Frame Type subfields static const int UID_NAMESPACEID_SIZE = 10; @@ -542,11 +546,11 @@ private: BLEDevice &ble; uint16_t advPeriodus; uint8_t txPower; - Timer timeSinceBootTimer; + mbed::Timer timeSinceBootTimer; volatile uint32_t lastBootTimerRead; volatile bool advLock; volatile FrameTypes frameIndex; - Timeout stopAdv; + mbed::Timeout stopAdv; // URI Frame Variables @@ -555,7 +559,7 @@ private: int8_t defaultUrlPower; bool urlIsSet; // flag that enables / disable URI Frames float urlAdvPeriod; // how long the url frame will be advertised for - Ticker urlTicker; + mbed::Ticker urlTicker; // UID Frame Variables UIDNamespaceID_t defaultUidNamespaceID; @@ -564,7 +568,7 @@ private: uint16_t uidRFU; bool uidIsSet; // flag that enables / disable UID Frames float uidAdvPeriod; // how long the uid frame will be advertised for - Ticker uidTicker; + mbed::Ticker uidTicker; // TLM Frame Variables uint8_t TlmVersion; @@ -574,7 +578,7 @@ private: volatile uint32_t TlmTimeSinceBoot; bool tlmIsSet; // flag that enables / disables TLM frames float TlmAdvPeriod; // number of minutes between adv frames - Ticker tlmTicker; + mbed::Ticker tlmTicker; public: /* From 9dae672ac009d6dfe54b2d95e74c1529ff7c342d Mon Sep 17 00:00:00 2001 From: Donatien Garnier Date: Fri, 4 Jan 2019 09:54:14 +0000 Subject: [PATCH 2/2] Fixes for features/FEATURE_BLE/ble/services/EddystoneConfigService.h --- features/FEATURE_BLE/ble/services/EddystoneConfigService.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/features/FEATURE_BLE/ble/services/EddystoneConfigService.h b/features/FEATURE_BLE/ble/services/EddystoneConfigService.h index e7cb9c01ac..99bed208b1 100644 --- a/features/FEATURE_BLE/ble/services/EddystoneConfigService.h +++ b/features/FEATURE_BLE/ble/services/EddystoneConfigService.h @@ -21,6 +21,8 @@ #include "ble/BLE.h" #include "ble/services/EddystoneService.h" +#include "Timer.h" +#include "Ticker.h" #define UUID_URI_BEACON(FIRST, SECOND) { \ 0xee, 0x0c, FIRST, SECOND, 0x87, 0x86, 0x40, 0xba, \ @@ -496,8 +498,8 @@ private: BLEDevice &ble; Params_t ¶ms; - Ticker timeSinceBootTick; - Timeout switchFrame; + mbed::Ticker timeSinceBootTick; + mbed::Timeout switchFrame; // Default value that is restored on reset. PowerLevels_t &defaultAdvPowerLevels; // This goes into the advertising frames (radio power measured at 1m from device). PowerLevels_t &radioPowerLevels; // This configures the power levels of the radio.