Skip to content

Commit

Permalink
fix Port calls in leap motion adapter
Browse files Browse the repository at this point in the history
"Message" should be capitalized to match event in driver

fix capitalization again (in example)

last event capitalization fix: hands example
  • Loading branch information
strongh committed Jul 15, 2014
1 parent b74d4c4 commit 0415059
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/leap_motion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}
Expand Down
2 changes: 1 addition & 1 deletion examples/leap_motion_hands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}
Expand Down
2 changes: 1 addition & 1 deletion platforms/leap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}
Expand Down
4 changes: 2 additions & 2 deletions platforms/leap/leap_motion_adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func NewLeapMotionAdaptor(name string, port string) *LeapMotionAdaptor {
port,
),
connect: func(l *LeapMotionAdaptor) {
origin := fmt.Sprintf("http://%v", l.Port)
url := fmt.Sprintf("ws://%v/v3.json", l.Port)
origin := fmt.Sprintf("http://%v", l.Port())
url := fmt.Sprintf("ws://%v/v3.json", l.Port())
ws, err := websocket.Dial(url, "", origin)
if err != nil {
panic(err)
Expand Down

0 comments on commit 0415059

Please sign in to comment.