The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 07:20:24 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  keys.cfg joystick settings question
« previous next »
Pages: [1] Print
Author Topic: keys.cfg joystick settings question  (Read 1547 times)
cast55
Guest


Email
keys.cfg joystick settings question
« on: December 04, 2004, 04:27:09 am »

Running UQM 0.3 on Debian linux:

I edited the keys.cfg file to enable joystick support, which works fine, and I currently have a MS Sidewinder Force Feedback Pro set up in this capacity; however, after playing for a while I decided that instead of using axis 0 for turning (sideways movement of stick), I would rather use axis 2 (axial rotation of stick).  The problem, verified by examining the output of jstest /dev/js0, is that while the other axes produce values between -32767 and +32767, this particular axis seems to be monopolar.  Reported values are between -32767 and 0, corresponding to full left to full right rotation (center position is -16383).  As such, I don't know what to enter for the joystick axis parameter, as the syntax appears to require a negative or positive declaration.  Is it possible to specify an offset to this value?

Any ideas would be greatly appreciated.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: keys.cfg joystick settings question
« Reply #1 on: December 04, 2004, 05:20:09 am »

SDL should map the values of the axis to values in the range  -32768 to 32767. So UQM doesn't get the same values as jstest. Positive and negative specify which end of the scale you want to map to a specific joystick event.

If this doesn't work, it may be that SDL is returning the wrong value. You could put some debug info in src/sc2code/libs/input/vcontrol.c, in the function VControl_ProcessJoyAxis() to check what UQM gets.
This doesn't mean that SDL itself is at fault. I suppose it will need to get the range of the joystick motion from the kernel joystick driver itself, unless the kernel is supposed to always return a value in the same range (I know very little about the kernel joystick interface). It may be that the range that SDL gets is incorrect, or that the kernel returns a value in the wrong range.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!