File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -2112,9 +2112,16 @@ class Gap {
2112
2112
*
2113
2113
* @note All restrictions from setScanParams(uint16_t, uint16_t, uint16_t, bool) apply.
2114
2114
*/
2115
- ble_error_t setScanParams (GapScanningParams scanningParams) {
2116
- _scanningParams = scanningParams;
2117
- return BLE_ERROR_NONE;
2115
+ ble_error_t setScanParams (const GapScanningParams& scanningParams) {
2116
+ ble_error_t rc;
2117
+ if (((rc = _scanningParams.setInterval (scanningParams.getInterval ())) == BLE_ERROR_NONE) &&
2118
+ ((rc = _scanningParams.setWindow (scanningParams.getWindow ())) == BLE_ERROR_NONE) &&
2119
+ ((rc = _scanningParams.setTimeout (scanningParams.getTimeout ())) == BLE_ERROR_NONE)) {
2120
+ _scanningParams.setActiveScanning (scanningParams.getActiveScanning ());
2121
+ return BLE_ERROR_NONE;
2122
+ }
2123
+
2124
+ return rc;
2118
2125
}
2119
2126
2120
2127
/* *
You can’t perform that action at this time.
0 commit comments