1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-11 19:29:20 +08:00

Merge pull request #522 from fawick/master

examples: correct events used by XBox360 joystick example
This commit is contained in:
Ron Evans 2018-05-07 20:58:29 +02:00 committed by GitHub
commit 846e992bf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,16 +28,16 @@ func main() {
stick.On(joystick.BRelease, func(data interface{}) {
fmt.Println("b_release")
})
stick.On(joystick.Up, func(data interface{}) {
stick.On(joystick.UpPress, func(data interface{}) {
fmt.Println("up", data)
})
stick.On(joystick.Down, func(data interface{}) {
stick.On(joystick.DownPress, func(data interface{}) {
fmt.Println("down", data)
})
stick.On(joystick.Left, func(data interface{}) {
stick.On(joystick.LeftPress, func(data interface{}) {
fmt.Println("left", data)
})
stick.On(joystick.Right, func(data interface{}) {
stick.On(joystick.RightPress, func(data interface{}) {
fmt.Println("right", data)
})
stick.On(joystick.LeftX, func(data interface{}) {