Skip to content

Commit

Permalink
Merge pull request hybridgroup#79 from strongh/leap-fix
Browse files Browse the repository at this point in the history
Leap examples and adaptor fix
  • Loading branch information
zankich committed Jul 15, 2014
2 parents 31e28f9 + 4427d0f commit 5a15fb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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
4 changes: 2 additions & 2 deletions platforms/leap/leap_motion_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewLeapMotionDriver(a *LeapMotionAdaptor, name string) *LeapMotionDriver {
),
}

l.AddEvent("Message")
l.AddEvent("message")
return l
}

Expand All @@ -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))
}
}()

Expand Down

0 comments on commit 5a15fb3

Please sign in to comment.