Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Problem with joystick axes  (Read 2120 times)

0 Members and 1 Guest are viewing this topic.

PabloAmunt

  • Newbie
  • *
  • Posts: 2
    • View Profile
Problem with joystick axes
« on: May 25, 2015, 11:32:56 pm »
Hi,

I'm using SFML 2.1 for my project in Ubuntu 12.04, I use the SFML library to read the state of a josystick. My programme works well and I can read the joystick but the problem is that I can't use the full travel of my joystick axes. I mean, I can only read about 3/4 of its full travel. Before arriving to the end of a side, the joystick saturates and I can't take full profit of my joystick.

I don't know whether it's a SFML or a joystick issue. My joystick is a Logitech Force 3d Pro, but I've tried my programme with a different Logitech joystick and it happens the same.

Can I do something to fix this? Is there a way to calibrate my joystick or something like that? Or do I need to install any kind of driver?

Thanks in advance

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Problem with joystick axes
« Reply #1 on: May 26, 2015, 12:17:30 am »
The options seem to be:
  • linux (driver) problem
  • broken joystick
  • problem in SFML

If you run windows, you could try reading the joystick axis under windows, using the same SFML program.  If it works under windows, then you know it's a linux-specific problem.  If it doesn't work under windows, then it's either a broken joystick, or general SFML problem. 

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Problem with joystick axes
« Reply #2 on: May 28, 2015, 02:21:16 pm »
What happens if you leave the "working" 75% area? Does the value reported in SFML no longer change? Any chance you have some excessively large dead area set in your drivers?

PabloAmunt

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Problem with joystick axes
« Reply #3 on: May 28, 2015, 09:22:39 pm »
Thanks to both of you. I've tried my joystick under Windows (without drivers) and It happens the same. There's a little dead zone at the end of the joystick travel.

Mario, when I leave the working area, the values don't change, they remain at the maximum or minimum. And I haven't installed any drivers. What should I install?

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Problem with joystick axes
« Reply #4 on: June 01, 2015, 02:46:28 pm »
Install drivers (if there are any provided by the manufacturer). Those might allow you to modify the dead zones. As long as it doesn't show up properly in Windows' Control Panel, there's most likely nothing SFML (or you) can do as a workaround.

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Problem with joystick axes
« Reply #5 on: June 03, 2015, 10:18:46 am »
There should only ever be deadzone in the center of the joystick.  Not at the far edges.  I think you likely have a broken joystick. 

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Problem with joystick axes
« Reply #6 on: June 04, 2015, 01:14:03 pm »
Actually thinking about it, yeah, yu might be right. Doesn't make sense to have a dead zone on the outer border of the area. :)

 

anything