GAP_ADV_PARAMS_INTERVAL_MAX and other such constants have moved into GapAdvertisingParams
This commit is contained in:
parent
989d0668d1
commit
3eda3f6fc3
1 changed files with 5 additions and 5 deletions
10
nRF51Gap.cpp
10
nRF51Gap.cpp
|
@ -134,13 +134,13 @@ ble_error_t nRF51Gap::startAdvertising(const GapAdvertisingParams ¶ms)
|
|||
/* 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 ¶ms)
|
|||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue