Commit 34e0308d authored by Kevin Seidel's avatar Kevin Seidel
Browse files

Merge branch 'allow-overriding-device-name-continue' of https://github.com/chenkaie/ble

parents 5b47d7e4 f6a550eb
......@@ -14,6 +14,11 @@ import (
// NewDevice returns the default HCI device.
func NewDevice() (*Device, error) {
return NewDeviceWithName("Gopher")
}
// NewDeviceWithName returns the default HCI device.
func NewDeviceWithName(name string) (*Device, error) {
dev, err := hci.NewHCI()
if err != nil {
return nil, errors.Wrap(err, "can't create hci")
......@@ -22,7 +27,7 @@ func NewDevice() (*Device, error) {
return nil, errors.Wrap(err, "can't init hci")
}
s, err := gatt.NewServer()
s, err := gatt.NewServerWithName(name)
if err != nil {
return nil, errors.Wrap(err, "can't create server")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment