fix "message" capitalization in leap driver

fix leap examples
This commit is contained in:
Homer Strong 2014-07-15 11:11:25 -07:00
parent 04150591f2
commit 4427d0f42b
4 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ func main() {
l := leap.NewLeapMotionDriver(leapMotionAdaptor, "leap")
work := func() {
gobot.On(l.Event("Message"), func(data interface{}) {
gobot.On(l.Event("message"), func(data interface{}) {
fmt.Println(data.(leap.Frame))
})
}

View File

@ -14,7 +14,7 @@ func main() {
l := leap.NewLeapMotionDriver(leapMotionAdaptor, "leap")
work := func() {
gobot.On(l.Event("Message"), func(data interface{}) {
gobot.On(l.Event("message"), func(data interface{}) {
printHands(data.(leap.Frame))
})
}

View File

@ -30,7 +30,7 @@ func main() {
l := leap.NewLeapMotionDriver(leapMotionAdaptor, "leap")
work := func() {
gobot.On(l.Event("Message"), func(data interface{}) {
gobot.On(l.Event("message"), func(data interface{}) {
fmt.Println(data.(leap.Frame))
})
}

View File

@ -20,7 +20,7 @@ func NewLeapMotionDriver(a *LeapMotionAdaptor, name string) *LeapMotionDriver {
),
}
l.AddEvent("Message")
l.AddEvent("message")
return l
}
@ -39,7 +39,7 @@ func (l *LeapMotionDriver) Start() bool {
for {
var msg []byte
websocket.Message.Receive(l.adaptor().ws, &msg)
gobot.Publish(l.Event("Message"), l.ParseFrame(msg))
gobot.Publish(l.Event("message"), l.ParseFrame(msg))
}
}()