ArduPilot / MAVProxy

MAVLink proxy and command line ground station
GNU General Public License v3.0
456 stars 674 forks source link

Joystick module fills terminal with "SDL_JoystickGetAxis value:" #498

Open AndKe opened 6 years ago

AndKe commented 6 years ago

(current master, on Linux) Is there a way to prevent this ?

suz1 commented 6 years ago

OK I have found this is because of SDL (a game library) printing debug messages, some sites are saying this is a compile time option for SDL, with debug options leading to printing this message. I am looking for a workaround (either piping this to dev null or recompiling the SDL module not to do this) as I also would like this functionality - it messes up SITL testing with a joystick as the MAVProxy window (though still functional) is spammed. I've tried looking through the code, but it appears that although there seems an aspiration to have verbose and debug modes, these switches ('joystick set debug, joystick set verbose') haven't been implemented yet. If I can find a workaround I will post it here.

suz1 commented 6 years ago

Ok solved. This problem is caused by a bug in pygame. You need at least version 1.9.3, in Linux this will not automatically install for me with pip install (I have 1.9.0 and the new version hasn't been updated). I followed the instructions at http://python-gaming.com/pygame/docs/install.html and successfully rebuilt pygame to 1.9.4dev, and these messages no longer appear but joystick input works.

peterbarker commented 6 years ago

On Wed, 4 Apr 2018, Suzanna Lucarotti wrote:

Ok solved. This problem is caused by a bug in pygame. You need at least

Thanks! This bug annoys me any time I deal with the joystick stuff.

AndKe commented 6 years ago

Can we hope to get an updated pygame soon ? , be it from pip or some mavproxy source ?

AndKe commented 6 years ago

it seems so close, yet fail to install ...

$ pip install --upgrade pygame
Collecting pygame
  Downloading https://files.pythonhosted.org/packages/26/38/947e70c170e03f0e0aee61ae2e2157278d6146447d2b8cc8c46be5986b3e/pygame-1.9.4-cp27-cp27mu-manylinux1_x86_64.whl (12.0MB)
    100% |████████████████████████████████| 12.0MB 1.6MB/s 
Installing collected packages: pygame
  Found existing installation: pygame 1.9.1release
Cannot uninstall 'pygame'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.