Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Problematic Saitek X52 joystick button assignment

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
Talkless
Poor
Poor
Posts: 7
Joined: Sun Feb 17, 2013 1:40 pm

Problematic Saitek X52 joystick button assignment

Post by Talkless »

Hello,

I've just tried to configure Saitek X54 joystick for Oolite 1.77 AMD64 downloaded from website under Ubuntu 12.10.

I wanted to assign button 29 or 30 (looked it up in jstest-gtk) at some slots but oolite accepts them as "Stick 1 Button 1", overriding "default" Fire button in main stick. It does not matter to which slot I try to assign it, its the same "Stick 1 Button 1".
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Problematic Saitek X52 joystick button assignment

Post by Diziet Sma »

G'day Talkless, and welcome aboard! 8)

I'm not entirely clear from your description "overriding "default" Fire button in main stick.", on whether you're trying to assign the button from within jstest-gtk, or Oolite, or both.

Could you describe what you are doing/trying to do in more detail, please?

Also, while not directly related to your problem, you might want to look at this post, where Tichy describes how to get jscal/jstest and SDL and Oolite to all play nice together. There may be something helpful there.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Talkless
Poor
Poor
Posts: 7
Joined: Sun Feb 17, 2013 1:40 pm

Re: Problematic Saitek X52 joystick button assignment

Post by Talkless »

Diziet Sma wrote:
I'm not entirely clear from your description "overriding "default" Fire button in main stick."
Sorry for not being too clear. I'll try again:

I want to assign button 29 (I've got this number from jstest-gtk) to "Toggle ID".

I press "Enter" to assign, click button 29, but instead I got "Stick 1 Button 1" is assigned to "Toggle ID" slot.

So now "Primary wearpon" is unassigned, "Toggle ID" is assignet to button 1, instead of 29.

Same problem with button 30.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Problematic Saitek X52 joystick button assignment

Post by Diziet Sma »

Hmm.. now this is interesting, because back before the 1.77 release, I was having some problems when switching between 1.76.1 and 1.77(trunk) under Linux. A number of my joystick settings were getting mixed up. Buttons 26-31 were being affected. In my case, this affected the hatswitch and a couple of secondary buttons on my Saitek Cyborg Evo, although not the primary fire. Link to bug report

This doesn't sound like quite the same problem as you're experiencing, but the mention of buttons 29 and 30 makes me suspicious. I'm wondering if the fix that another _commander applied has inadvertently introduced some problem that only shows with your stick, or perhaps somehow it was not applied to the 64bit Linux version.

I'm going to give another_commander a heads-up on this thread, to see what he thinks.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6572
Joined: Wed Feb 28, 2007 7:54 am

Re: Problematic Saitek X52 joystick button assignment

Post by another_commander »

A quick look does not seem to indicate any issue with the code itself and I do not think that this is a duplicate of bug #18798. However, maybe it would help if we could see the .GNUstepDefaults file as it appears immediately afer trying to set button 29.
Talkless
Poor
Poor
Posts: 7
Joined: Sun Feb 17, 2013 1:40 pm

Re: Problematic Saitek X52 joystick button assignment

Post by Talkless »

I just tried to assign more buttons and now I see that whole button range from 16 up to 30 (inclusively) assigns as 1.

Here are changes after asigning button 29 to "Toggle ID":

Code: Select all

diff -p .GNUstepDefaults.before .GNUstepDefaults
*** .GNUstepDefaults.before	2013-02-20 21:40:58.917860428 +0200
--- .GNUstepDefaults	2013-02-20 21:41:03.273882027 +0200
***************
*** 79,84 ****
--- 79,93 ----
  		<key>stickNum</key>
  		<integer>0</integer>
  	    </dict>
+ 	    <key>22</key>
+ 	    <dict>
+ 		<key>isAxis</key>
+ 		<integer>0</integer>
+ 		<key>stickAxBt</key>
+ 		<integer>0</integer>
+ 		<key>stickNum</key>
+ 		<integer>0</integer>
+ 	    </dict>
  	    <key>23</key>
  	    <dict>
  		<key>isAxis</key>
JesusFreke
Harmless
Harmless
Posts: 1
Joined: Tue Mar 19, 2013 3:48 am

Re: Problematic Saitek X52 joystick button assignment

Post by JesusFreke »

I just got a new Saitek x52 and ran into the same issue, on oolite 1.77. But after playing around with it for a while, luckily I found a workaround. You can set the SDL_JOYSTICK_DEVICE to the input device of your joystick, and SDL/oolite will recognize all the buttons.

i.e.

Code: Select all

SDL_JOYSTICK_DEVICE=/dev/input/js0 oolite
Talkless
Poor
Poor
Posts: 7
Joined: Sun Feb 17, 2013 1:40 pm

Re: Problematic Saitek X52 joystick button assignment

Post by Talkless »

JesusFreke wrote:

Code: Select all

SDL_JOYSTICK_DEVICE=/dev/input/js0 oolite
Yes, this works for me too, thanks!
Post Reply