softdevice: add support for connection timeout on connect
This adds support for the "connection supervision timeout", basically the connection timeout while the connection is active (as opposed to while connecting).
This commit is contained in:
parent
ecf09759ac
commit
b8c79250c7
1 changed files with 3 additions and 0 deletions
|
@ -149,6 +149,9 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err
|
|||
slave_latency: 0, // mostly relevant to connected keyboards etc
|
||||
conn_sup_timeout: 200, // 2 seconds (in 10ms units), the minimum recommended by Apple
|
||||
}
|
||||
if params.Timeout != 0 {
|
||||
connectionParams.conn_sup_timeout = uint16(params.Timeout / 16)
|
||||
}
|
||||
|
||||
// Flag to the event handler that we are waiting for incoming connections.
|
||||
// This should be safe as long as Connect is not called concurrently. And
|
||||
|
|
Loading…
Reference in a new issue