I thought I'd try fighting with Pitch/Yaw instead of Pitch/Roll, and got it to work, but found a number of bugs in the process. Here they are.
Issue 1:
Problem: When setting an action to an axis that is currently set, the old action gets 'stuck'. For instance, I have axis 1 set to roll, and I want to set it to yaw; I select it in the menu, then press stick left to tell it which axis to use. I leave the setup menu, and now axis 1 controls yaw, but my ship is constantly rolling left.
Theory: It seems that the last roll value the game got before unsetting the roll was frozen. (so it gets stuck thinking the joystick wants it to constantly roll left)
Workaround: Unset current action of axis before setting new one.
which brought me to
Issue 2:
Problem: When roll is not set, pitch does not work.
Theory: This took some minor hunting, and led me to the .GNUstepDefaults file. I figured it was being written wrong or getting corrupted, but the JoystickAxes section for normal (Roll/pitch) is
JoystickAxes = {
0 = {
isAxis = <*BY>;
stickAxBt = <*I0>;
stickNum = <*I0>;
};
1 = {
isAxis = <*BY>;
stickAxBt = <*I1>;
stickNum = <*I0>;
};
4 = {
isAxis = <*BY>;
stickAxBt = <*I2>;
stickNum = <*I0>;
};
};
And after I set it to Yaw/Pitch, (I expected it to be a bit hosed) it looks like:
JoystickAxes = {
1 = {
isAxis = <*BY>;
stickAxBt = <*I1>;
stickNum = <*I0>;
};
2 = {
isAxis = <*BY>;
stickAxBt = <*I0>;
stickNum = <*I0>;
};
4 = {
isAxis = <*BY>;
stickAxBt = <*I2>;
stickNum = <*I0>;
};
};
Okay, not too hard to figure out, *B boolean value, *I integer etc.
so main index is 0 -> roll, 1-> pitch, 2 -> yaw. (4 is speed, but that's not relevant here.)
and stickAxBt (axis index) is 0 -> left/right, 1 -> up/down.
It looks like it should work, (I was expecting the secont 1 = ... section to be missing/corrupted.)
Theory: Somehow the logic of reading the file is not reading the 1 = ... section if there is no 0 = ... section
Workaround: On a hunch I tried adding an invalid 0 = ... section:
JoystickAxes = {
0 = {
isAxis = <*BY>;
stickAxBt = <*I0>;
stickNum = <*I1>;
};
1 = {
isAxis = <*BY>;
stickAxBt = <*I1>;
stickNum = <*I0>;
};
2 = {
isAxis = <*BY>;
stickAxBt = <*I0>;
stickNum = <*I0>;
};
4 = {
isAxis = <*BY>;
stickAxBt = <*I2>;
stickNum = <*I0>;
};
};
Note that I put a 0 = ... section reading from joystick 1 (second joystick for those of you who don't know that computers count from 0). I don't have a second joystick, and was a bit worried it would just crash. But it fixed the problem.
[Solved] Joystick axis issues (with current workarounds)
Moderators: winston, another_commander, Getafix
-
- Harmless
- Posts: 1
- Joined: Wed Jul 07, 2010 3:30 pm
- Location: USA
- Anduin Shadowmantle
- Mostly Harmless
- Posts: 2
- Joined: Fri Aug 13, 2010 10:24 am
A small tweak...
I had exactly the same problem with my joystick, a Logitech atk3. Worked fine, then I decided to change from roll to yaw... Aaaah! I updated drivers, tried to use Logitech’s profiler, pulled more of my tentacles out... until, halleluiah, I found your post!
I simply found my .GNUstepDefaults file, used notebook to read it. Found the joystick section and copied your 0 = section before the 1 = section. Saved it, opened oolite and by the slimiest Lavian tree grub, I was flying straight! Bobs you’re Diso, I thought! So off I hyperspaced when suddenly, after a quick tug on my joystick, I found myself rolling instead of yawing...
What the Reidiquat! I checked my joystick config and it had assigned roll to joystick 2... yet I did not have a joystick 2... and worse it had override joystick 1... It looked like my yawing days were over... I would just have to roll with it...
This was no time for cheap gags I thought! I reopened .GNUstepDefaults file and simply changed the stickNum value to -1... like so...
0 = {
isAxis = <*BY>;
stickAxBt = <*I0>;
stickNum = <*I-1>;
};
And it works! No stick is found.
What a load of trumbles over nothing...
I simply found my .GNUstepDefaults file, used notebook to read it. Found the joystick section and copied your 0 = section before the 1 = section. Saved it, opened oolite and by the slimiest Lavian tree grub, I was flying straight! Bobs you’re Diso, I thought! So off I hyperspaced when suddenly, after a quick tug on my joystick, I found myself rolling instead of yawing...
What the Reidiquat! I checked my joystick config and it had assigned roll to joystick 2... yet I did not have a joystick 2... and worse it had override joystick 1... It looked like my yawing days were over... I would just have to roll with it...
This was no time for cheap gags I thought! I reopened .GNUstepDefaults file and simply changed the stickNum value to -1... like so...
0 = {
isAxis = <*BY>;
stickAxBt = <*I0>;
stickNum = <*I-1>;
};
And it works! No stick is found.
What a load of trumbles over nothing...
- Anduin Shadowmantle
- Mostly Harmless
- Posts: 2
- Joined: Fri Aug 13, 2010 10:24 am
Not a complete solution though... Shouldn't it happen automatically when configuring your joystick?
Should have paid more attention in my advance computer programming classes back on Zaonce
Love this game... Oolite has made something amazing, amazingly more amazing!
(Sorry for the grammar, thats just how we talk from Zaonce... it is apparently a very tedious place...)
Should have paid more attention in my advance computer programming classes back on Zaonce
Love this game... Oolite has made something amazing, amazingly more amazing!
(Sorry for the grammar, thats just how we talk from Zaonce... it is apparently a very tedious place...)
- Getafix
- Quite Grand Sub-Admiral
- Posts: 979
- Joined: Tue Apr 01, 2008 12:55 pm
- Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
- Contact:
Re: Joystick issues (with current workarounds)
Both issues have been confirmed and
a proper solution is on its way.
Stay tuned!
a proper solution is on its way.
Stay tuned!
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
- Getafix
- Quite Grand Sub-Admiral
- Posts: 979
- Joined: Tue Apr 01, 2008 12:55 pm
- Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
- Contact:
Re: Joystick issues (with current workarounds)
Both issues should be properly addressed in r3751 (trunk & maintenance).
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]