[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] No data from joystick



Neil,

Joystick motion is an event. In the docs is a script
named eventlist.py. It prints events on the screen as
they occur. If your joystick's movements are reported
by eventlist.py, then there's not a problem.

Link to docs for Windows:
http://www.pygame.org/ftp/pygame-1.8-docs-setup.exe

This is Pete Shinners' explanation:
http://www.pygame.org/ftp/contrib/input.html

Jason

--- Neil Fraser <root@xxxxxxxxxxxxxxxx> wrote:

> pygame.joystick correctly detects my joystick, reads
> its name, number
> of axies, buttons and hats.  But all data relating
> to the position of
> these controls is 0.
> 
>   joystick.init()
>   print joystick.get_name()
>       -> "Logitech Extreme 3D Pro USB"
>   print joystick.get_numaxes()
>       -> 4
>   print joystick.get_axis(0)
>       -> 0.0
>   print joystick.get_numbuttons()
>       -> 4
>   print joystick.get_button(0)
>       -> 0
>   print joystick.get_numhats()
>       -> 1
>   print joystick.get_hat(0)
>       -> (0, 0)
> 
> The Windows XP game controller window correctly
> shows control data.
> 
> Any ideas why pygame doesn't see any data?
> 
> -- 
> Neil Fraser, Programmer & Wizard
> http://neil.fraser.name
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ