GAP_ADV_PARAMS_INTERVAL_MAX and other such constants have moved into GapAdvertisingParams

This commit is contained in:
Rohit Grover 2014-11-10 14:46:52 +00:00
parent 989d0668d1
commit 3eda3f6fc3
1 changed files with 5 additions and 5 deletions

View File

@ -134,13 +134,13 @@ ble_error_t nRF51Gap::startAdvertising(const GapAdvertisingParams &params)
/* Check interval range */
if (params.getAdvertisingType() == GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED) {
/* Min delay is slightly longer for unconnectable devices */
if ((params.getInterval() < GAP_ADV_PARAMS_INTERVAL_MIN_NONCON) ||
(params.getInterval() > GAP_ADV_PARAMS_INTERVAL_MAX)) {
if ((params.getInterval() < GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MIN_NONCON) ||
(params.getInterval() > GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MAX)) {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
}
} else {
if ((params.getInterval() < GAP_ADV_PARAMS_INTERVAL_MIN) ||
(params.getInterval() > GAP_ADV_PARAMS_INTERVAL_MAX)) {
if ((params.getInterval() < GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MIN) ||
(params.getInterval() > GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MAX)) {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
}
}
@ -154,7 +154,7 @@ ble_error_t nRF51Gap::startAdvertising(const GapAdvertisingParams &params)
/* Check timeout for other advertising types */
if ((params.getAdvertisingType() != GapAdvertisingParams::ADV_CONNECTABLE_DIRECTED) &&
(params.getTimeout() > GAP_ADV_PARAMS_TIMEOUT_MAX)) {
(params.getTimeout() > GapAdvertisingParams::GAP_ADV_PARAMS_TIMEOUT_MAX)) {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
}