mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-27 13:48:56 +08:00
Update joystick examples
This commit is contained in:
parent
851b9bc48e
commit
9ea4224193
@ -9,7 +9,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
gbot := gobot.NewGobot()
|
gbot := gobot.NewGobot()
|
||||||
joystickAdaptor := joystick.NewJoystickAdaptor("ps3")
|
joystickAdaptor := joystick.NewJoystickAdaptor("ps3")
|
||||||
joystickDriver := joystick.NewJoystickDriver(joystickAdaptor, "ps3", "../joystick/configs/dualshock3.json")
|
joystickDriver := joystick.NewJoystickDriver(joystickAdaptor, "ps3", "./platforms/joystick/configs/dualshock3.json")
|
||||||
|
|
||||||
work := func() {
|
work := func() {
|
||||||
gobot.On(joystickDriver.Events["square_press"], func(data interface{}) {
|
gobot.On(joystickDriver.Events["square_press"], func(data interface{}) {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
gbot := gobot.NewGobot()
|
gbot := gobot.NewGobot()
|
||||||
joystickAdaptor := joystick.NewJoystickAdaptor("xbox360")
|
joystickAdaptor := joystick.NewJoystickAdaptor("xbox360")
|
||||||
joystickDriver := joystick.NewJoystickDriver(joystickAdaptor, "xbox360", "../joystick/configs/xbox360_power_a_mini_proex.json")
|
joystickDriver := joystick.NewJoystickDriver(joystickAdaptor, "xbox360", "./platforms/joystick/configs/joystick/configs/xbox360_power_a_mini_proex.json")
|
||||||
|
|
||||||
work := func() {
|
work := func() {
|
||||||
gobot.On(joystickDriver.Events["a_press"], func(data interface{}) {
|
gobot.On(joystickDriver.Events["a_press"], func(data interface{}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user