Fixed bugs with Gap:: and GapAdvertisingParams

This commit is contained in:
Joshua Slater 2015-08-06 11:04:38 +01:00
parent 0f2ba674c8
commit e65471d680
2 changed files with 5 additions and 5 deletions

View file

@ -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));
}
/**

View file

@ -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;