[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant gu - assumed 'gu' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant personal_album_id - assumed 'personal_album_id' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant gu - assumed 'gu' (this will throw an Error in a future version of PHP)
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 969: Use of undefined constant user_images - assumed 'user_images' (this will throw an Error in a future version of PHP)
Speed Dreams Community • View topic - Joystick Woes

Joystick Woes

Use this forum to report bugs or ask for help

Moderator: kilo

Joystick Woes

Postby survient » Fri Jan 06, 2012 10:57 am

I read mungewell's post about the pressure sensitive settings however I"m still having issues getting it to accept a button as an axis instead of a button. I'm running on linux and can conform in jstest that the buttons have axis' assigned to them and are responsive. Is there a way to manually edit the controls xml? Thanks
survient
 
Posts: 4
Joined: Fri Jan 06, 2012 10:51 am

Re: Joystick Woes

Postby mungewell » Fri Jan 06, 2012 4:55 pm

You can edit the config file directly (just a text file '~/.speeddreams2/driver/human/preferences.xml') and set which controls you want, if you know how axis/buttons on the joystick are mapped.

However that should not be necessary....if the button is pressure sensitive then it will report both axis and button. The code will (should) cycle through acceptable input types each time the control is set, if it reads the wrong one re-select the control and try again.

For example 1st try might give 'BUT4-0', the 'ATOB8-0'. Some controls prefer button inputs, some prefer axis. Which control are you trying to map?

I put a little delay in the system from the first detected 'movement', it then checks again to see if another button/axis has moved. I find that if I'm not quick enough pressing the button then it might not detected as 'pressure sensitive'.
mungewell
 
Posts: 307
Joined: Fri May 20, 2011 4:05 pm
Location: Southen Alberta, Canada

Re: Joystick Woes

Postby mungewell » Fri Jan 06, 2012 5:06 pm

If you want to see the code it's here:
https://sourceforge.net/apps/trac/speed ... config.cpp

There's a table at the start which defines which controls can use which type of input (HM_ATT_JOY_REQ_BUT, HM_ATT_JOY_REQ_AXIS, HM_ATT_JOY_PREF_BUT, HM_ATT_JOY_PREF_AXIS, HM_ATT_JOY_PREF_ANY).
mungewell
 
Posts: 307
Joined: Fri May 20, 2011 4:05 pm
Location: Southen Alberta, Canada

Re: Joystick Woes

Postby survient » Sat Jan 07, 2012 12:35 am

I'm not sure, maybe I'm missing something. I'm using a PS3 SixAxis controller via USB(on linux) which in jstest shows both the button and the axis registering when I push a button. I'm seeing the joystick axis in speed dreams registering false input(I assume due to interference from the motion sensor), which may be interfering with the cycling input recognition . I'll fiddle with it on my linux box in a bit and get back with my results.
survient
 
Posts: 4
Joined: Fri Jan 06, 2012 10:51 am

Re: Joystick Woes

Postby survient » Sat Jan 07, 2012 6:13 am

Alright, got a much clearer idea of what's going on. So apparently the axis quantity the sim can recognize caps at 12, storing them as "AXIS0-0" through "AXIS11-0". Any higher and it defaults back to "A", which pressing the A key does nothing. Now this may be fixable in code, but another workaround(if I can figure it out) would be to remap each axis I want to use using jscal to a number between 0 - 11. While more than 12 usable axis for this sim would probably be overkill, I have run into a few quirky controllers(including the PS3 sixaxis) that set the numbers of their axis stupidly high even though it may only have 4 or 5 usable axis.

I was able to use the dpad(pressure sensitive)'s axis just fine, but I did have to manually configure preferences.xml. Again I think that speeddreams get confused because the default sixaxis driver in linux will have axis 0-3 start spazzing out after a few minutes I believe due to the motion sensor interfering somehow, so the only option is to manually set joystick controls.

I'll work on remapping the axis but if anybody has a better idea it would be appreciated.
survient
 
Posts: 4
Joined: Fri Jan 06, 2012 10:51 am

Re: Joystick Woes

Postby mungewell » Sat Jan 07, 2012 6:38 pm

For reference, here's how the SixAxis is seen by the system
--
simon@womble:~$ uname -a
Linux womble 3.0.0-dfp+ #6 SMP Fri Jul 29 17:37:56 PDT 2011 i686 i686 i386 GNU/Linux
--
Jan 7 11:23:43 womble kernel: [ 4342.252973] usbhid: USB HID core driver
Jan 7 11:23:43 womble kernel: [ 4342.479840] sony 0003:054C:0268.0001: Fixing up Sony Sixaxis report descriptor
Jan 7 11:23:43 womble kernel: [ 4342.542229] input: Sony PLAYSTATION(R)3 Controller as /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input7
Jan 7 11:23:43 womble kernel: [ 4342.545863] sony 0003:054C:0268.0001: input,hiddev0,hidraw0: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-0000:00:1d.1-1/input0
--

--
simon@womble:~$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Sony PLAYSTATION(R)3 Controller) has 27 axes (X, Y, Z, Rz, (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null))
and 19 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4, BaseBtn5, BaseBtn6, BtnDead, BtnA, BtnB, BtnC, (null), (null), (null)).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 14: 0 15: 0 16: 0 17: 0 18: 0 19: 0 20: 0 21: 0 22: 0 23: 0 24: 0 25: 0 26: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off 1
--

Axis are as follows....
Left thumbstick on 0 & 1
Right thumbstick on 2 & 3
D up, right, down and left on 8, 9, 10 & 11 (11 has a problem which was reported to the kernel list a while back).
L2, R2, L1 and R1 on 12, 13, 14 & 15
Triangle, Circle, Cross and Square on 16, 17, 18 & 19.
Accelerometer's are on 23, 24 and 25 (so should not be a problem).

Which buttons/sticks are you trying to register?

When using this controller I prefer L2 brake, R2 acc, right thumbstick steer and left thumbstick shift.
mungewell
 
Posts: 307
Joined: Fri May 20, 2011 4:05 pm
Location: Southen Alberta, Canada

Re: Joystick Woes

Postby mungewell » Sat Jan 07, 2012 6:47 pm

If you still have to remap the buttons/axis take a look at the userland driver for the Xbox controller:
http://pingus.seul.org/~grumbel/xboxdrv/

This (apparently) can do the remapping of axis and buttons.
Simon
mungewell
 
Posts: 307
Joined: Fri May 20, 2011 4:05 pm
Location: Southen Alberta, Canada

Re: Joystick Woes

Postby survient » Sat Jan 07, 2012 10:33 pm

Considering the luxury I get of having pressure sensitive buttons, I prefer X for acceleration, Square for brake, and R2 for clutch with left joystick for steering. Something I don't(probably can't) get in windows, and thus why I savored it when I was able to remap the axis using the updated jscal.
survient
 
Posts: 4
Joined: Fri Jan 06, 2012 10:51 am


Return to Problems, Fixes & Help

Who is online

Users browsing this forum: No registered users and 17 guests

cron