From 6a88d2af379e18be6483809f49bd619c984e777b Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Wed, 20 May 2015 12:50:23 +0100 Subject: [PATCH] use Gap::ConnectionParams_t in connect() --- public/BLEDevice.h | 6 ++++-- public/Gap.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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;