mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-11 19:29:20 +08:00
joystick: correct scanner error from ID
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
parent
8f0344f6bc
commit
b9dedf09b0
@ -42,7 +42,7 @@ func run() int {
|
||||
t.Timestamp, t.Hat, t.Value)
|
||||
case *sdl.JoyDeviceEvent:
|
||||
if t.Type == sdl.JOYDEVICEADDED {
|
||||
joysticks[int(t.Which)] = sdl.JoystickOpen(int(t.Which))
|
||||
joysticks[int(t.Which)] = sdl.JoystickOpen(t.Which)
|
||||
if joysticks[int(t.Which)] != nil {
|
||||
fmt.Printf("Joystick %d connected\n", t.Which)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user