From e65471d680641b37bb0b61574330cf1a0aa82b9f Mon Sep 17 00:00:00 2001 From: Joshua Slater Date: Thu, 6 Aug 2015 11:04:38 +0100 Subject: [PATCH] Fixed bugs with Gap:: and GapAdvertisingParams --- ble/Gap.h | 2 +- source/GapScanningParams.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ble/Gap.h b/ble/Gap.h index c7151f7..6d11c6f 100644 --- a/ble/Gap.h +++ b/ble/Gap.h @@ -464,7 +464,7 @@ public: } else if (interval < getMinAdvertisingInterval()) { interval = getMinAdvertisingInterval(); } - _advParams.setInterval(MSEC_TO_ADVERTISEMENT_DURATION_UNITS(interval)); + _advParams.setInterval(GapAdvertisingParams::MSEC_TO_ADVERTISEMENT_DURATION_UNITS(interval)); } /** diff --git a/source/GapScanningParams.cpp b/source/GapScanningParams.cpp index cc3ee56..1d9f1cb 100644 --- a/source/GapScanningParams.cpp +++ b/source/GapScanningParams.cpp @@ -18,8 +18,8 @@ #include "ble/GapScanningParams.h" GapScanningParams::GapScanningParams(uint16_t interval, uint16_t window, uint16_t timeout, bool activeScanning) : - _interval(Gap::MSEC_TO_SCAN_DURATION_UNITS(interval)), - _window(Gap::MSEC_TO_SCAN_DURATION_UNITS(window)), + _interval(MSEC_TO_SCAN_DURATION_UNITS(interval)), + _window(MSEC_TO_SCAN_DURATION_UNITS(window)), _timeout(timeout), _activeScanning(activeScanning) { /* stay within limits */ @@ -40,7 +40,7 @@ GapScanningParams::GapScanningParams(uint16_t interval, uint16_t window, uint16_ ble_error_t GapScanningParams::setInterval(uint16_t newIntervalInMS) { - uint16_t newInterval = Gap::MSEC_TO_SCAN_DURATION_UNITS(newIntervalInMS); + uint16_t newInterval = MSEC_TO_SCAN_DURATION_UNITS(newIntervalInMS); if ((newInterval >= SCAN_INTERVAL_MIN) && (newInterval < SCAN_INTERVAL_MAX)) { _interval = newInterval; return BLE_ERROR_NONE; @@ -52,7 +52,7 @@ GapScanningParams::setInterval(uint16_t newIntervalInMS) ble_error_t GapScanningParams::setWindow(uint16_t newWindowInMS) { - uint16_t newWindow = Gap::MSEC_TO_SCAN_DURATION_UNITS(newWindowInMS); + uint16_t newWindow = MSEC_TO_SCAN_DURATION_UNITS(newWindowInMS); if ((newWindow >= SCAN_WINDOW_MIN) && (newWindow < SCAN_WINDOW_MAX)) { _window = newWindow; return BLE_ERROR_NONE;