ardrone: use new improved default namer to avoid API conflicts

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-02-02 16:34:21 +01:00
parent 3e52fb38f8
commit 064ea6cc9c
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package ardrone
import (
client "github.com/hybridgroup/go-ardrone/client"
"gobot.io/x/gobot"
)
// drone defines expected drone behaviour
@ -33,7 +34,7 @@ type Adaptor struct {
//
func NewAdaptor(v ...string) *Adaptor {
a := &Adaptor{
name: "ARDrone",
name: gobot.DefaultName("ARDrone"),
connect: func(a *Adaptor) (drone, error) {
return client.Connect(a.config)
},

View File

@ -22,7 +22,7 @@ type Driver struct {
// 'flying' - Sent when the device has taken off.
func NewDriver(connection *Adaptor) *Driver {
d := &Driver{
name: "ARDrone",
name: gobot.DefaultName("ARDrone"),
connection: connection,
Eventer: gobot.NewEventer(),
}