ardrone: use new improved default namer to avoid API conflicts
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
3e52fb38f8
commit
064ea6cc9c
|
@ -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)
|
||||
},
|
||||
|
|
|
@ -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(),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue