Skip to content

Commit

Permalink
Merge pull request hybridgroup#322 from radovskyb/dev
Browse files Browse the repository at this point in the history
fixed undefined method errors
  • Loading branch information
deadprogram authored Oct 17, 2016
2 parents 79e787d + 6c93f49 commit 8f4320a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion platforms/ardrone/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example:
work := func() {
drone.TakeOff()
gobot.On(drone.Event("flying"), func(data interface{}) {
drone.On(drone.Event("flying"), func(data interface{}) {
gobot.After(3*time.Second, func() {
drone.Land()
})
Expand Down
16 changes: 8 additions & 8 deletions platforms/joystick/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ Example:
)
work := func() {
gobot.On(joystick.Event("square_press"), func(data interface{}) {
joystick.On(joystick.Event("square_press"), func(data interface{}) {
fmt.Println("square_press")
})
gobot.On(joystick.Event("square_release"), func(data interface{}) {
joystick.On(joystick.Event("square_release"), func(data interface{}) {
fmt.Println("square_release")
})
gobot.On(joystick.Event("triangle_press"), func(data interface{}) {
joystick.On(joystick.Event("triangle_press"), func(data interface{}) {
fmt.Println("triangle_press")
})
gobot.On(joystick.Event("triangle_release"), func(data interface{}) {
joystick.On(joystick.Event("triangle_release"), func(data interface{}) {
fmt.Println("triangle_release")
})
gobot.On(joystick.Event("left_x"), func(data interface{}) {
joystick.On(joystick.Event("left_x"), func(data interface{}) {
fmt.Println("left_x", data)
})
gobot.On(joystick.Event("left_y"), func(data interface{}) {
joystick.On(joystick.Event("left_y"), func(data interface{}) {
fmt.Println("left_y", data)
})
gobot.On(joystick.Event("right_x"), func(data interface{}) {
joystick.On(joystick.Event("right_x"), func(data interface{}) {
fmt.Println("right_x", data)
})
gobot.On(joystick.Event("right_y"), func(data interface{}) {
joystick.On(joystick.Event("right_y"), func(data interface{}) {
fmt.Println("right_y", data)
})
}
Expand Down
2 changes: 1 addition & 1 deletion platforms/leap/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Example:
l := leap.NewDriver(leapMotionAdaptor)
work := func() {
gobot.On(l.Event("message"), func(data interface{}) {
l.On(l.Event("message"), func(data interface{}) {
fmt.Println(data.(leap.Frame))
})
}
Expand Down
4 changes: 2 additions & 2 deletions platforms/mavlink/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example:
iris := mavlink.NewDriver(adaptor)
work := func() {
gobot.Once(iris.Event("packet"), func(data interface{}) {
iris.Once(iris.Event("packet"), func(data interface{}) {
packet := data.(*common.MAVLinkPacket)
dataStream := common.NewRequestDataStream(100,
Expand All @@ -39,7 +39,7 @@ Example:
))
})
gobot.On(iris.Event("message"), func(data interface{}) {
iris.On(iris.Event("message"), func(data interface{}) {
if data.(common.MAVLinkMessage).Id() == 30 {
message := data.(*common.Attitude)
fmt.Println("Attitude")
Expand Down
14 changes: 7 additions & 7 deletions platforms/neurosky/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ Example:
neuro := neurosky.NewDriver(adaptor)
work := func() {
gobot.On(neuro.Event("extended"), func(data interface{}) {
neuro.On(neuro.Event("extended"), func(data interface{}) {
fmt.Println("Extended", data)
})
gobot.On(neuro.Event("signal"), func(data interface{}) {
neuro.On(neuro.Event("signal"), func(data interface{}) {
fmt.Println("Signal", data)
})
gobot.On(neuro.Event("attention"), func(data interface{}) {
neuro.On(neuro.Event("attention"), func(data interface{}) {
fmt.Println("Attention", data)
})
gobot.On(neuro.Event("meditation"), func(data interface{}) {
neuro.On(neuro.Event("meditation"), func(data interface{}) {
fmt.Println("Meditation", data)
})
gobot.On(neuro.Event("blink"), func(data interface{}) {
neuro.On(neuro.Event("blink"), func(data interface{}) {
fmt.Println("Blink", data)
})
gobot.On(neuro.Event("wave"), func(data interface{}) {
neuro.On(neuro.Event("wave"), func(data interface{}) {
fmt.Println("Wave", data)
})
gobot.On(neuro.Event("eeg"), func(data interface{}) {
neuro.On(neuro.Event("eeg"), func(data interface{}) {
eeg := data.(neurosky.EEG)
fmt.Println("Delta", eeg.Delta)
fmt.Println("Theta", eeg.Theta)
Expand Down

0 comments on commit 8f4320a

Please sign in to comment.