fix "message" capitalization in leap driver
fix leap examples
This commit is contained in:
parent
cdb26ad036
commit
3a0a677abe
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in New Issue