pass in some useful connection paramters from connect()

This commit is contained in:
Rohit Grover 2015-05-20 12:54:18 +01:00
parent 6a88d2af37
commit cc30c92fa5

View file

@ -862,12 +862,24 @@ BLEDevice::stopScan(void) {
inline ble_error_t
BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType) {
Gap::ConnectionParams_t connectionParams;
Gap::ConnectionParams_t connectionParams = {
.minConnectionInterval = 30,
.maxConnectionInterval = 100,
.slaveLatency = 0,
.connectionSupervisionTimeout = 400
};
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) {
Gap::ConnectionParams_t connectionParams;
Gap::ConnectionParams_t connectionParams = {
.minConnectionInterval = 30,
.maxConnectionInterval = 100,
.slaveLatency = 0,
.connectionSupervisionTimeout = 400
};
return transport->getGap().connect(peerAddr, peerAddrType, scanParams, connectionParams);
}