diff --git a/public/BLEDevice.h b/public/BLEDevice.h index 7579724..7cb4e86 100644 --- a/public/BLEDevice.h +++ b/public/BLEDevice.h @@ -862,11 +862,13 @@ BLEDevice::stopScan(void) { inline ble_error_t BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType) { - return transport->getGap().connect(peerAddr, peerAddrType, scanningParams); + Gap::ConnectionParams_t connectionParams; + return transport->getGap().connect(peerAddr, peerAddrType, scanningParams, connectionParams); } inline ble_error_t BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams) { - return transport->getGap().connect(peerAddr, peerAddrType, scanParams); + Gap::ConnectionParams_t connectionParams; + return transport->getGap().connect(peerAddr, peerAddrType, scanParams, connectionParams); } inline ble_error_t diff --git a/public/Gap.h b/public/Gap.h index 6114b03..8c1d6f3 100644 --- a/public/Gap.h +++ b/public/Gap.h @@ -177,7 +177,7 @@ private: virtual uint16_t getMinAdvertisingInterval(void) const = 0; virtual uint16_t getMinNonConnectableAdvertisingInterval(void) const = 0; virtual uint16_t getMaxAdvertisingInterval(void) const = 0; - virtual ble_error_t connect(const Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams) = 0; + virtual ble_error_t connect(const Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams, const ConnectionParams_t& connectionParams) = 0; virtual ble_error_t disconnect(DisconnectionReason_t reason) = 0; virtual ble_error_t getPreferredConnectionParams(ConnectionParams_t *params) = 0; virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params) = 0;