From 3a0a677abe34404a106cc01708f74c05b025ba03 Mon Sep 17 00:00:00 2001 From: Homer Strong Date: Tue, 15 Jul 2014 11:11:25 -0700 Subject: [PATCH] fix "message" capitalization in leap driver fix leap examples --- examples/leap_motion.go | 2 +- examples/leap_motion_hands.go | 2 +- platforms/leap/README.md | 2 +- platforms/leap/leap_motion_driver.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/leap_motion.go b/examples/leap_motion.go index 6477d567..21645234 100644 --- a/examples/leap_motion.go +++ b/examples/leap_motion.go @@ -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)) }) } diff --git a/examples/leap_motion_hands.go b/examples/leap_motion_hands.go index 1991e1f4..13880c62 100644 --- a/examples/leap_motion_hands.go +++ b/examples/leap_motion_hands.go @@ -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)) }) } diff --git a/platforms/leap/README.md b/platforms/leap/README.md index 4cc0d9de..1d9fd0ad 100644 --- a/platforms/leap/README.md +++ b/platforms/leap/README.md @@ -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)) }) } diff --git a/platforms/leap/leap_motion_driver.go b/platforms/leap/leap_motion_driver.go index e0113810..8ca38454 100644 --- a/platforms/leap/leap_motion_driver.go +++ b/platforms/leap/leap_motion_driver.go @@ -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)) } }()